add [Ctrl+X] for cut text in 't_edit'
git-svn-id: svn://kolibrios.org@7497 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> box_lib.obj
|
||||
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TextEditor <20><><EFBFBD> Kolibri OS
|
||||
; 䠩<> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> ࠧ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 20.02.2016 IgorA
|
||||
; 䠩<> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> ࠧ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 21.10.2018 IgorA
|
||||
; <20><> <20><><EFBFBD> <20>ਬ<EFBFBD><E0A8AC><EFBFBD><EFBFBD><EFBFBD> GPL2 <20><>業<EFBFBD><E6A5AD><EFBFBD>
|
||||
|
||||
;input:
|
||||
@@ -275,6 +275,10 @@ proc ted_key, edit:dword, table:dword, control:dword
|
||||
jne @f
|
||||
stdcall ted_but_undo,edi
|
||||
@@:
|
||||
cmp ah,45 ;Ctrl+X
|
||||
jne @f
|
||||
stdcall ted_but_cut,edi
|
||||
@@:
|
||||
cmp ah,46 ;Ctrl+C
|
||||
jne @f
|
||||
stdcall ted_but_copy,edi
|
||||
@@ -609,13 +613,13 @@ align 16
|
||||
proc ted_sel_start uses eax ecx
|
||||
mov eax,ted_scr_h
|
||||
mov ecx,ted_cur_x
|
||||
add ecx,dword[eax+sb_offs_position]
|
||||
add ecx,[eax+sb_offs_position]
|
||||
mov ted_sel_x0,ecx
|
||||
mov ted_sel_x1,ecx
|
||||
|
||||
mov eax,ted_scr_w
|
||||
mov ecx,ted_cur_y
|
||||
add ecx,dword[eax+sb_offs_position]
|
||||
add ecx,[eax+sb_offs_position]
|
||||
mov ted_sel_y0,ecx
|
||||
mov ted_sel_y1,ecx
|
||||
ret
|
||||
@@ -630,12 +634,12 @@ proc ted_sel_move
|
||||
push eax ecx
|
||||
mov ecx,ted_cur_x
|
||||
mov eax,ted_scr_h
|
||||
add ecx,dword[eax+sb_offs_position]
|
||||
add ecx,[eax+sb_offs_position]
|
||||
mov ted_sel_x1,ecx
|
||||
|
||||
mov eax,ted_scr_w
|
||||
mov ecx,ted_cur_y
|
||||
add ecx,dword[eax+sb_offs_position]
|
||||
add ecx,[eax+sb_offs_position]
|
||||
mov ted_sel_y1,ecx
|
||||
pop ecx eax
|
||||
cmp ted_fun_draw_panel_buttons,0 ;redraw toolbar (need to button Copy)
|
||||
@@ -900,7 +904,7 @@ ted_iterat_perv:
|
||||
je .else
|
||||
push ebx
|
||||
@@:
|
||||
mov edx,dword[edx+2]
|
||||
mov edx,[edx+2]
|
||||
cmp edx,0
|
||||
je @f
|
||||
imul edx,sizeof.symbol
|
||||
@@ -917,7 +921,7 @@ ted_iterat_perv:
|
||||
pop ebx
|
||||
ret
|
||||
.else:
|
||||
mov edx,dword[edx+2]
|
||||
mov edx,[edx+2]
|
||||
cmp edx,0
|
||||
je @f
|
||||
imul edx,sizeof.symbol
|
||||
@@ -943,7 +947,7 @@ ted_iterat_next:
|
||||
je .else
|
||||
push ebx
|
||||
@@:
|
||||
mov edx,dword[edx+6]
|
||||
mov edx,[edx+6]
|
||||
cmp edx,1
|
||||
jle @f
|
||||
imul edx,sizeof.symbol
|
||||
@@ -961,7 +965,7 @@ ted_iterat_next:
|
||||
pop ebx
|
||||
ret
|
||||
.else:
|
||||
mov edx,dword[edx+6]
|
||||
mov edx,[edx+6]
|
||||
cmp edx,1
|
||||
jle @f
|
||||
imul edx,sizeof.symbol
|
||||
@@ -1088,7 +1092,7 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
|
||||
jl .no_add ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <1 <20><>룠<EFBFBD><EBA3A0> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
|
||||
mov edi,[edit]
|
||||
mov esi,dword[text]
|
||||
mov esi,[text]
|
||||
|
||||
call ted_get_pos_by_cursor
|
||||
call ted_get_text_perv_pos
|
||||
@@ -1099,35 +1103,35 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
|
||||
je @f
|
||||
push eax ;c_sp=cur[cn].x+Scroller->XPos-StrLen(cur[cn].y+Scroller->YPos);
|
||||
mov eax,ted_scr_h
|
||||
mov eax,dword[eax+sb_offs_position]
|
||||
mov eax,[eax+sb_offs_position]
|
||||
add eax,ted_cur_x ;eax - <20><><EFBFBD><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD>
|
||||
mov dword[new_spc],eax
|
||||
mov [new_spc],eax
|
||||
|
||||
mov eax,ted_scr_w
|
||||
mov eax,dword[eax+sb_offs_position]
|
||||
mov eax,[eax+sb_offs_position]
|
||||
add eax,ted_cur_y ;eax - <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD>
|
||||
call ted_strlen ;ebx = line len
|
||||
sub dword[new_spc],ebx ;<3B><> <20><><EFBFBD><EFBFBD>樨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⭨<EFBFBD><E2ADA8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD>, 㧭<><E3A7AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞<EFBFBD><EFA5AC> <20><EFBFBD><E0AEA1><EFBFBD><EFBFBD>
|
||||
sub [new_spc],ebx ;<3B><> <20><><EFBFBD><EFBFBD>樨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⭨<EFBFBD><E2ADA8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD>, 㧭<><E3A7AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞<EFBFBD><EFA5AC> <20><EFBFBD><E0AEA1><EFBFBD><EFBFBD>
|
||||
pop eax
|
||||
@@:
|
||||
|
||||
mov ebx,dword[t_len]
|
||||
mov ebx,[t_len]
|
||||
|
||||
mov dword[new_lin],0
|
||||
cmp ted_gp_opt,0
|
||||
jne @f
|
||||
push eax
|
||||
mov eax,ted_scr_w
|
||||
mov eax,dword[eax+sb_offs_position]
|
||||
mov eax,[eax+sb_offs_position]
|
||||
add eax,ted_cur_y
|
||||
inc eax
|
||||
mov dword[new_lin],eax
|
||||
mov [new_lin],eax
|
||||
|
||||
call ted_get_num_lines
|
||||
sub dword[new_lin],eax
|
||||
sub [new_lin],eax
|
||||
;㢥<><E3A2A5>稢<EFBFBD><E7A8A2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><E0AEAB><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD><E2A5AB><EFBFBD><EFBFBD> <20><>ப
|
||||
mov ecx,ted_scr_w
|
||||
add dword[ecx+sb_offs_max_area],eax ;㢥<><E3A2A5>稢<EFBFBD><E7A8A2><EFBFBD> ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD>⨪<EFBFBD><E2A8AA>쭮<EFBFBD><ECADAE> <20><><EFBFBD><E0AEAB><EFBFBD><EFBFBD><EFBFBD>
|
||||
add [ecx+sb_offs_max_area],eax ;㢥<><E3A2A5>稢<EFBFBD><E7A8A2><EFBFBD> ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD>⨪<EFBFBD><E2A8AA>쭮<EFBFBD><ECADAE> <20><><EFBFBD><E0AEAB><EFBFBD><EFBFBD><EFBFBD>
|
||||
pop eax
|
||||
@@:
|
||||
|
||||
@@ -1302,11 +1306,11 @@ align 4
|
||||
align 16
|
||||
proc ted_but_convert_by_table uses eax edx edi esi, edit:dword, table:dword
|
||||
mov edi,[edit]
|
||||
mov esi,dword[table]
|
||||
mov esi,[table]
|
||||
mov edx,ted_tex
|
||||
.cycle:
|
||||
;<3B><><EFBFBD><EFBFBD>室<EFBFBD><E5AEA4> <20><> <><E1ABA5><EFBFBD>騩 ᨬ<><E1A8AC><EFBFBD>
|
||||
mov edx,dword[edx+6]
|
||||
mov edx,[edx+6]
|
||||
cmp edx,1
|
||||
jle .end_text
|
||||
imul edx,sizeof.symbol
|
||||
@@ -1402,7 +1406,7 @@ endp
|
||||
align 16
|
||||
proc ted_text_del uses ecx edx edi, edit:dword, del_opt:dword
|
||||
mov edi,[edit]
|
||||
mov ebx,dword[del_opt]
|
||||
mov ebx,[del_opt]
|
||||
|
||||
xor cl,cl
|
||||
test ebx,ted_opt_ed_move_cursor
|
||||
@@ -1578,8 +1582,8 @@ align 16
|
||||
ted_cur_move_down:
|
||||
push eax ebx
|
||||
mov ebx,ted_scr_w
|
||||
mov dl,0
|
||||
mov eax,dword[ebx+sb_offs_cur_area]
|
||||
xor dl,dl
|
||||
mov eax,[ebx+sb_offs_cur_area]
|
||||
dec eax
|
||||
cmp ted_cur_y,eax
|
||||
jge @f
|
||||
@@ -1588,9 +1592,9 @@ ted_cur_move_down:
|
||||
jmp .ret_f
|
||||
@@:
|
||||
mov eax,ted_cur_y
|
||||
add eax,dword[ebx+sb_offs_position]
|
||||
add eax,[ebx+sb_offs_position]
|
||||
inc eax
|
||||
cmp dword[ebx+sb_offs_max_area],eax
|
||||
cmp [ebx+sb_offs_max_area],eax
|
||||
jle @f
|
||||
inc dword[ebx+sb_offs_position]
|
||||
mov dl,8
|
||||
@@ -1607,24 +1611,24 @@ ted_cur_move_down:
|
||||
; dl = 1 if move up
|
||||
align 16
|
||||
ted_cur_move_page_up:
|
||||
push eax ebx
|
||||
mov ebx,ted_scr_w
|
||||
mov eax,dword[ebx+sb_offs_cur_area]
|
||||
xor dl,dl
|
||||
cmp eax,dword[ebx+sb_offs_position]
|
||||
jg @f
|
||||
sub dword[ebx+sb_offs_position],eax
|
||||
mov dl,1
|
||||
@@:
|
||||
cmp dword[ebx+sb_offs_position],0
|
||||
je @f
|
||||
cmp dl,1
|
||||
je @f
|
||||
mov dword[ebx+sb_offs_position],0
|
||||
mov dl,1
|
||||
@@:
|
||||
pop ebx eax
|
||||
ret
|
||||
push eax ebx
|
||||
mov ebx,ted_scr_w
|
||||
mov eax,[ebx+sb_offs_cur_area]
|
||||
xor dl,dl
|
||||
cmp eax,[ebx+sb_offs_position]
|
||||
jg @f
|
||||
sub [ebx+sb_offs_position],eax
|
||||
mov dl,1
|
||||
@@:
|
||||
cmp dword[ebx+sb_offs_position],0
|
||||
je @f
|
||||
cmp dl,1
|
||||
je @f
|
||||
mov dword[ebx+sb_offs_position],0
|
||||
mov dl,1
|
||||
@@:
|
||||
pop ebx eax
|
||||
ret
|
||||
|
||||
;input:
|
||||
; edi = pointer to tedit struct
|
||||
@@ -1634,17 +1638,17 @@ ted_cur_move_page_down:
|
||||
mov ecx,ted_scr_w
|
||||
|
||||
xor dl,dl
|
||||
mov eax,dword[ecx+sb_offs_max_area]
|
||||
sub eax,dword[ecx+sb_offs_cur_area]
|
||||
cmp dword[ecx+sb_offs_position],eax
|
||||
mov eax,[ecx+sb_offs_max_area]
|
||||
sub eax,[ecx+sb_offs_cur_area]
|
||||
cmp [ecx+sb_offs_position],eax
|
||||
jge @f
|
||||
mov ebx,dword[ecx+sb_offs_cur_area]
|
||||
add dword[ecx+sb_offs_position],ebx
|
||||
mov ebx,[ecx+sb_offs_cur_area]
|
||||
add [ecx+sb_offs_position],ebx
|
||||
mov dl,1
|
||||
mov dword[ecx+sb_offs_redraw],1
|
||||
cmp dword[ecx+sb_offs_position],eax
|
||||
cmp [ecx+sb_offs_position],eax
|
||||
jle @f
|
||||
mov dword[ecx+sb_offs_position],eax
|
||||
mov [ecx+sb_offs_position],eax
|
||||
@@:
|
||||
pop ecx ebx eax
|
||||
ret
|
||||
@@ -1705,7 +1709,7 @@ ted_cur_move_right:
|
||||
push eax ebx
|
||||
mov eax,ted_scr_h
|
||||
xor dl,dl
|
||||
mov ebx,dword[eax+sb_offs_cur_area]
|
||||
mov ebx,[eax+sb_offs_cur_area]
|
||||
cmp ted_cur_x,ebx
|
||||
jge @f
|
||||
inc ted_cur_x
|
||||
@@ -1728,23 +1732,23 @@ ted_cur_move_x_last_char:
|
||||
push eax ebx ecx
|
||||
mov eax,ted_cur_y
|
||||
mov ecx,ted_scr_w
|
||||
add eax,dword[ecx+sb_offs_position]
|
||||
add eax,[ecx+sb_offs_position]
|
||||
call ted_strlen
|
||||
xor dl,dl
|
||||
|
||||
mov ecx,ted_scr_h
|
||||
cmp ebx,dword[ecx+sb_offs_position]
|
||||
cmp ebx,[ecx+sb_offs_position]
|
||||
jge @f
|
||||
mov dl,8
|
||||
mov dword[ecx+sb_offs_position],ebx
|
||||
mov [ecx+sb_offs_position],ebx
|
||||
@@:
|
||||
sub ebx,dword[ecx+sb_offs_position]
|
||||
sub ebx,[ecx+sb_offs_position]
|
||||
|
||||
cmp ebx,dword[ecx+sb_offs_cur_area]
|
||||
cmp ebx,[ecx+sb_offs_cur_area]
|
||||
jle @f ; b---[---]---e
|
||||
add dword[ecx+sb_offs_position],ebx
|
||||
mov ebx,dword[ecx+sb_offs_cur_area]
|
||||
sub dword[ecx+sb_offs_position],ebx
|
||||
add [ecx+sb_offs_position],ebx
|
||||
mov ebx,[ecx+sb_offs_cur_area]
|
||||
sub [ecx+sb_offs_position],ebx
|
||||
mov dl,8
|
||||
@@:
|
||||
mov ted_cur_x,ebx
|
||||
@@ -1798,7 +1802,7 @@ ted_get_text_arr_index:
|
||||
; edx = pointer to 'perv' struct
|
||||
align 16
|
||||
ted_get_text_perv_pos:
|
||||
mov edx,dword[edx+2]
|
||||
mov edx,[edx+2]
|
||||
imul edx,sizeof.symbol
|
||||
add edx,ted_tex
|
||||
ret
|
||||
@@ -1809,7 +1813,7 @@ ted_get_text_perv_pos:
|
||||
; edx = pointer to 'next' symbol struct
|
||||
align 16
|
||||
ted_get_text_next_pos:
|
||||
mov edx,dword[edx+6]
|
||||
mov edx,[edx+6]
|
||||
imul edx,sizeof.symbol
|
||||
add edx,ted_tex
|
||||
ret
|
||||
@@ -1826,10 +1830,10 @@ ted_get_pos_by_cursor:
|
||||
push eax ecx esi
|
||||
mov esi,ted_cur_x
|
||||
mov eax,ted_scr_h
|
||||
add esi,dword[eax+sb_offs_position]
|
||||
add esi,[eax+sb_offs_position]
|
||||
mov ecx,ted_cur_y
|
||||
mov eax,ted_scr_w
|
||||
add ecx,dword[eax+sb_offs_position]
|
||||
add ecx,[eax+sb_offs_position]
|
||||
call ted_get_pos_by_coords
|
||||
pop esi ecx eax
|
||||
ret
|
||||
@@ -2053,15 +2057,15 @@ ted_go_to_pos:
|
||||
push eax
|
||||
mov eax,ted_scr_w
|
||||
mov ted_cur_x,ecx
|
||||
sub edx,dword[eax+sb_offs_position]
|
||||
sub edx,[eax+sb_offs_position]
|
||||
|
||||
cmp edx,dword[eax+sb_offs_cur_area] ;ted_cur_y > [.cur_area]
|
||||
cmp edx,[eax+sb_offs_cur_area] ;ted_cur_y > [.cur_area]
|
||||
jl @f
|
||||
push ebx
|
||||
mov ebx,edx
|
||||
sub ebx,dword[eax+sb_offs_cur_area]
|
||||
sub ebx,[eax+sb_offs_cur_area]
|
||||
inc ebx
|
||||
add dword[eax+sb_offs_position],ebx
|
||||
add [eax+sb_offs_position],ebx
|
||||
sub edx,ebx
|
||||
pop ebx
|
||||
; ??? redrav
|
||||
@@ -2132,7 +2136,7 @@ endl
|
||||
mov al,byte[edx]
|
||||
shl ax,2 ;eax*=4
|
||||
add eax,ted_arr_key_pos
|
||||
mov eax,dword[eax]
|
||||
mov eax,[eax]
|
||||
cmp eax,0
|
||||
jl @b ;if( (word_n=ted_arr_key_pos[(unsigned char)tex[i].c])>-1 ){
|
||||
|
||||
@@ -2150,7 +2154,7 @@ endl
|
||||
jmp .wh_1b
|
||||
.wh_1e:
|
||||
|
||||
mov dword[begPos],edx ;bP=i;
|
||||
mov [begPos],edx ;bP=i;
|
||||
mov esi,1
|
||||
align 4
|
||||
.wh_2b: ;while(1){
|
||||
@@ -2174,18 +2178,18 @@ align 4
|
||||
ColToIndexOffset eax,ebx
|
||||
cmp byte[ebx+esi],0
|
||||
jne .if_0 ;if(Col[word_n].Text[pos]==0){
|
||||
mov dword[endPos],edx ;eP=i;
|
||||
mov [endPos],edx ;eP=i;
|
||||
ColToIndexOffset eax,ebx
|
||||
mov bl,byte[ebx+MAX_COLOR_WORD_LEN+7]
|
||||
mov byte[f_color],bl ;f_color=Col[word_n].color;
|
||||
mov bl,[ebx+MAX_COLOR_WORD_LEN+7]
|
||||
mov [f_color],bl ;f_color=Col[word_n].color;
|
||||
|
||||
mov byte[find],1
|
||||
ColToIndexOffset eax,ebx ;... ebx = Col[word_n]
|
||||
mov bl,byte[ebx+MAX_COLOR_WORD_LEN+4]
|
||||
mov bl,[ebx+MAX_COLOR_WORD_LEN+4]
|
||||
cmp bl,0 ;if(Col[word_n].wwo)
|
||||
je .if_2n
|
||||
push edx
|
||||
mov edx,dword[begPos]
|
||||
mov edx,[begPos]
|
||||
call ted_iterat_perv
|
||||
|
||||
btr bx,0 ;1-1
|
||||
@@ -2205,7 +2209,7 @@ align 4
|
||||
mov byte[find],0
|
||||
.if_4e:
|
||||
|
||||
mov edx,dword[endPos]
|
||||
mov edx,[endPos]
|
||||
;call ted_iterat_next
|
||||
|
||||
btr bx,1 ;2-1
|
||||
@@ -2271,20 +2275,20 @@ align 4
|
||||
|
||||
cmp byte[find],1 ;if(fnd)break;
|
||||
je @f
|
||||
mov edx,dword[begPos];i=bP;
|
||||
mov edx,[begPos];i=bP;
|
||||
jmp @b
|
||||
@@:
|
||||
|
||||
cmp byte[find],1
|
||||
jne .if_1e ;if(fnd){ // <20>뤥<EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<><E2A5AA><EFBFBD>
|
||||
;if(!mode_sf1 || (mode_sf1 && strlen(Col[word_n].f1->c_str())>0)){
|
||||
mov eax,dword[begPos]
|
||||
mov bl,byte[f_color]
|
||||
mov byte[eax+1],bl ;tex[bP].col=f_color;
|
||||
mov eax,dword[endPos]
|
||||
mov eax,[begPos]
|
||||
mov bl,[f_color]
|
||||
mov [eax+1],bl ;tex[bP].col=f_color;
|
||||
mov eax,[endPos]
|
||||
mov byte[eax+1],0xff ;tex[eP].col=255;
|
||||
;return ItPoPerv(eP); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>宦<EFBFBD><E5AEA6><EFBFBD><EFBFBD><EFBFBD>
|
||||
mov edx,dword[endPos]
|
||||
mov edx,[endPos]
|
||||
call ted_get_text_perv_pos
|
||||
jmp @f
|
||||
.if_1e:
|
||||
@@ -2366,23 +2370,23 @@ proc ted_find_help_id, end_pos:dword
|
||||
|
||||
push ebx ecx
|
||||
xor ebx,ebx
|
||||
mov bl,byte[edx]
|
||||
mov bl,[edx]
|
||||
shl bx,2 ;ebx*=4
|
||||
add ebx,ted_arr_key_pos
|
||||
mov ecx,dword[ebx]
|
||||
mov ecx,[ebx]
|
||||
cmp ecx,0
|
||||
jl .if_0e ;if( (word_n=ted_arr_key_pos[(unsigned char)tf[0]])>-1 ){
|
||||
push esi eax
|
||||
mov ebx,ecx ;l_pos=word_n;
|
||||
ColToIndexOffset ecx,esi
|
||||
push cx
|
||||
mov cl,byte[esi]
|
||||
mov cl,[esi]
|
||||
@@:
|
||||
cmp ebx,ted_key_words_count ;while(l_pos<ted_key_words_count)
|
||||
jge @f
|
||||
;ColToIndexOffset ecx,esi
|
||||
ColToIndexOffset ebx,eax
|
||||
cmp cl,byte[eax] ;&& Col[l_pos].Text[0]==Col[word_n].Text[0])
|
||||
cmp cl,[eax] ;&& Col[l_pos].Text[0]==Col[word_n].Text[0])
|
||||
jne @f
|
||||
inc ebx ;l_pos++;
|
||||
jmp @b
|
||||
@@ -2420,7 +2424,7 @@ proc ted_find_help_id, end_pos:dword
|
||||
cmp ecx,ebx ;if(word_n==l_pos) break;
|
||||
je @f
|
||||
call ted_iterat_next ;pos++;
|
||||
cmp edx,dword[end_pos] ;for(...;i<strlen;...)
|
||||
cmp edx,[end_pos] ;for(...;i<strlen;...)
|
||||
je @f ;jge
|
||||
inc esi
|
||||
jmp @b
|
||||
@@ -2544,6 +2548,8 @@ proc ted_but_select_word, edit:dword
|
||||
ret
|
||||
endp
|
||||
|
||||
;output:
|
||||
; al = 1 if delete
|
||||
align 16
|
||||
proc ted_but_cut uses edi, edit:dword
|
||||
mov edi,[edit]
|
||||
@@ -2562,8 +2568,6 @@ proc ted_but_cut uses edi, edit:dword
|
||||
ret
|
||||
endp
|
||||
|
||||
;output:
|
||||
; al = 1 if copy text
|
||||
align 16
|
||||
proc ted_but_copy, edit:dword
|
||||
pushad
|
||||
@@ -2644,7 +2648,7 @@ proc ted_but_paste, edit:dword
|
||||
je .no_buf_r
|
||||
cmp eax,-1
|
||||
je .no_buf_r
|
||||
mov ecx,dword[eax]
|
||||
mov ecx,[eax]
|
||||
cmp ecx,1 ;size
|
||||
jl .no_buf_r
|
||||
cmp dword[eax+4],0 ;text
|
||||
@@ -2863,12 +2867,12 @@ ted_key_ctrl_end:
|
||||
push eax ebx
|
||||
call ted_get_num_lines
|
||||
mov ebx,ted_scr_w
|
||||
mov dword[ebx+sb_offs_position],eax ;<3B>⠢<EFBFBD><E2A0A2> <20><><EFBFBD><EFBFBD>㭮<EFBFBD> <20><> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><>ப<EFBFBD> <20><><EFBFBD>㬥<EFBFBD><E3ACA5><EFBFBD>
|
||||
cmp eax,dword[ebx+sb_offs_cur_area]
|
||||
mov [ebx+sb_offs_position],eax ;<3B>⠢<EFBFBD><E2A0A2> <20><><EFBFBD><EFBFBD>㭮<EFBFBD> <20><> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><>ப<EFBFBD> <20><><EFBFBD>㬥<EFBFBD><E3ACA5><EFBFBD>
|
||||
cmp eax,[ebx+sb_offs_cur_area]
|
||||
jle @f
|
||||
mov eax,dword[ebx+sb_offs_cur_area] ;<3B><><EFBFBD><EFBFBD>砥<EFBFBD> <20><> <20><>ப <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>
|
||||
mov eax,[ebx+sb_offs_cur_area] ;<3B><><EFBFBD><EFBFBD>砥<EFBFBD> <20><> <20><>ப <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>
|
||||
@@:
|
||||
sub dword[ebx+sb_offs_position],eax ;<3B>⭨<EFBFBD><E2ADA8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>㭪<EFBFBD> <20><> <20><>ப <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> (<28><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD>㬥<EFBFBD><E3ACA5><EFBFBD>)
|
||||
sub [ebx+sb_offs_position],eax ;<3B>⭨<EFBFBD><E2ADA8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>㭪<EFBFBD> <20><> <20><>ப <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> (<28><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD>㬥<EFBFBD><E3ACA5><EFBFBD>)
|
||||
dec eax
|
||||
mov ted_cur_y,eax ;<3B>⠢<EFBFBD><E2A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><>ப<EFBFBD> <20><><EFBFBD>㬥<EFBFBD><E3ACA5><EFBFBD>
|
||||
pop ebx eax
|
||||
@@ -3080,7 +3084,7 @@ ted_get_symb_color:
|
||||
shl ax,2 ;㬭<><E3ACAD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<><E6A2A5> <20><> 4 <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
mov ecx,ted_text_colors ;<3B>ਡ<EFBFBD><E0A8A1><EFBFBD>塞 ᬥ饭<E1ACA5><E9A5AD> 1-<2D><> 梥<><E6A2A5>
|
||||
add ecx,eax
|
||||
mov ecx,dword[ecx] ;<3B><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<>騩 梥<> ⥪<><E2A5AA><EFBFBD> <20><> ᬥ饭<E1ACA5><E9A5AD>
|
||||
mov ecx,[ecx] ;<3B><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<>騩 梥<> ⥪<><E2A5AA><EFBFBD> <20><> ᬥ饭<E1ACA5><E9A5AD>
|
||||
.exit:
|
||||
or ecx,ted_font_size
|
||||
pop edx eax
|
||||
@@ -3141,7 +3145,7 @@ proc ted_draw, edit:dword
|
||||
|
||||
mov eax,SF_DRAW_TEXT
|
||||
mov ecx,ted_text_colors
|
||||
mov ecx,dword[ecx]
|
||||
mov ecx,[ecx]
|
||||
|
||||
mov ebx,ted_wnd_l
|
||||
add ebx,ted_rec_l
|
||||
@@ -3772,7 +3776,7 @@ proc ted_clear_line_before_draw, edit:dword, coords:dword, clear_o:dword, numb_l
|
||||
mov bx,dx
|
||||
jmp .no_wnd
|
||||
.in_wnd:
|
||||
mov bx,0
|
||||
xor bx,bx
|
||||
.no_wnd:
|
||||
mov edx,ted_color_wnd_work
|
||||
int 0x40
|
||||
|
Reference in New Issue
Block a user