forked from KolibriOS/kolibrios
fix tree_list (r. 7959)
fix t_edit (r. 7877) git-svn-id: svn://kolibrios.org@8533 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
; ¬ ªà®á ¤«ï á¨á⥬®© ¡¨¡«¨®â¥ª¨ box_lib.obj
|
||||
; í«¥¬¥â TextEditor ¤«ï Kolibri OS
|
||||
; ä ©« ¯®á«¥¤¨© à § ¨§¬¥ï«áï 10.06.2020 IgorA
|
||||
; ä ©« ¯®á«¥¤¨© à § ¨§¬¥ï«áï 12.01.2021 IgorA
|
||||
; ª®¤ ¯à¨¬¥¥ GPL2 «¨æ¥§¨ï
|
||||
|
||||
;input:
|
||||
@@ -2201,7 +2201,7 @@ proc ted_text_find_sel_color uses eax ebx ecx esi
|
||||
locals
|
||||
begPos dd ? ; ç «ì ï ¯®§¨æ¨ï
|
||||
endPos dd ? ;ª®¥ç ï ¯®§¨æ¨ï
|
||||
find db ? ; ©¤¥® / ¥ ©¤¥®
|
||||
find db ? ;0 - ¥ ©¤¥®, 1 - ©¤¥®, 2 - ©¤¥® ¢ ª®æ¥ ä ©«
|
||||
f_color db ? ;¨¤¥ªá 梥⠩¤¥®£® á«®¢
|
||||
endl
|
||||
;eax = word_n ⥪ã騩 ®¬¥à (¯®§¨æ¨ï) ¯à®¢¥à塞®£® á«®¢ ¢ ᯨ᪥
|
||||
@@ -2217,9 +2217,8 @@ endl
|
||||
cmp edx,ted_tex_1
|
||||
jle .cycle0end
|
||||
|
||||
xor eax,eax
|
||||
mov al,byte[edx]
|
||||
shl ax,2 ;eax*=4
|
||||
movzx eax,byte[edx]
|
||||
shl eax,2 ;eax*=4
|
||||
add eax,ted_arr_key_pos
|
||||
mov eax,[eax]
|
||||
cmp eax,0
|
||||
@@ -2323,6 +2322,7 @@ align 4
|
||||
jg @f
|
||||
;¥á«¨ ¤®è«¨ ¤® ª®æ ä ©« ¨ ¥ 諨 ᨬ¢®« ª®æ à §¬¥âª¨
|
||||
call ted_iterat_perv
|
||||
mov byte[find],2
|
||||
@@:
|
||||
mov dword[endPos],edx
|
||||
.if_7e:
|
||||
@@ -2361,21 +2361,23 @@ align 4
|
||||
jmp .wh_2b
|
||||
.wh_2e:
|
||||
|
||||
cmp byte[find],1 ;if(fnd)break;
|
||||
je .cycle0end
|
||||
cmp byte[find],0 ;if(fnd)break;
|
||||
jne .cycle0end
|
||||
mov edx,[begPos];i=bP;
|
||||
jmp .cycle0
|
||||
.cycle0end:
|
||||
|
||||
cmp byte[find],1
|
||||
jne .if_1e ;if(fnd){ // ¢ë¤¥«¥¨¥ ©¤¥®£® ⥪áâ
|
||||
cmp byte[find],0
|
||||
je .if_1e ;if(fnd){ // ¢ë¤¥«¥¨¥ ©¤¥®£® ⥪áâ
|
||||
;if(!mode_sf1 || (mode_sf1 && strlen(Col[word_n].f1->c_str())>0)){
|
||||
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); // ¢®§¢à é ¥¬ ¯®§¨æ¨î ª®æ ¢å®¦¤¥¨ï
|
||||
cmp byte[find],2
|
||||
je .if_1e
|
||||
;return ItPoPerv(eP); // ¢®§¢à é ¥¬ ¯®§¨æ¨î ª®æ ¢å®¦¤¥¨ï
|
||||
mov edx,[endPos]
|
||||
call ted_get_text_perv_pos
|
||||
jmp @f
|
||||
@@ -2456,9 +2458,8 @@ proc ted_find_help_id uses ebx ecx, end_pos:dword
|
||||
; ebx = l_pos
|
||||
mov ted_help_id,-1
|
||||
|
||||
xor ebx,ebx
|
||||
mov bl,[edx]
|
||||
shl bx,2 ;ebx*=4
|
||||
movzx ebx,byte[edx]
|
||||
shl ebx,2 ;ebx*=4
|
||||
add ebx,ted_arr_key_pos
|
||||
mov ecx,[ebx]
|
||||
cmp ecx,0
|
||||
@@ -3386,17 +3387,15 @@ ted_get_symb_color:
|
||||
cmp edx,ted_tex_1
|
||||
jle .exit
|
||||
.on_first:
|
||||
xor eax,eax
|
||||
mov al,byte[edx+1]
|
||||
or al,al ;¥á«¨ al=0 ⮠梥⠥ ¬¥ï¥âáï
|
||||
movzx eax,byte[edx+1]
|
||||
or eax,eax ;¥á«¨ al=0 ⮠梥⠥ ¬¥ï¥âáï
|
||||
jz @b
|
||||
|
||||
cmp eax,ted_colors_text_count
|
||||
jge .exit
|
||||
|
||||
shl ax,2 ;㬮¦ ¥¬ ¨¤¥ªá 梥â 4 ¡ ©â
|
||||
mov ecx,ted_text_colors ;¯à¨¡ ¢«ï¥¬ ᬥ饨¥ 1-£® 梥â
|
||||
add ecx,eax
|
||||
lea ecx,[ecx+4*eax]
|
||||
mov ecx,[ecx] ;ãáâ ¢«¨¢ ¥¬ ⥪ã騩 梥â ⥪áâ ¯® ᬥ饨î
|
||||
.exit:
|
||||
or ecx,ted_font_size
|
||||
@@ -3774,9 +3773,8 @@ proc ted_draw_help_f1
|
||||
add ebx,13 ;=3+10
|
||||
|
||||
;SetTextColor
|
||||
xor eax,eax
|
||||
mov al,byte[edx+MAX_COLOR_WORD_LEN+7]
|
||||
shl ax,2
|
||||
movzx eax,byte[edx+MAX_COLOR_WORD_LEN+7]
|
||||
shl eax,2
|
||||
mov ecx,ted_text_colors
|
||||
add ecx,eax
|
||||
mov ecx,[ecx]
|
||||
@@ -4131,15 +4129,14 @@ proc ted_opt_draw_line_left uses ebx
|
||||
or ebx,ebx
|
||||
jz @f
|
||||
;--------------------------------------
|
||||
xor eax,eax ;eax ¡ã¤¥â ¬¥ïâìáï
|
||||
mov al,byte[edx+1]
|
||||
or al,al
|
||||
;eax ¡ã¤¥â ¬¥ïâìáï
|
||||
movzx eax,byte[edx+1]
|
||||
or eax,eax
|
||||
jz .no_color
|
||||
cmp eax,ted_colors_text_count
|
||||
jge .no_color
|
||||
xor ecx,ecx
|
||||
mov cl,byte[edx+1]
|
||||
shl cx,2
|
||||
movzx ecx,byte[edx+1]
|
||||
shl ecx,2
|
||||
add ecx,ted_text_colors
|
||||
mov ecx,[ecx]
|
||||
.no_color:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; í«¥¬¥â TreeList ¤«ï ¡¨¡«¨®â¥ª¨ box_lib.obj
|
||||
; ª®¤ ¯à¨¬¥¥ GPL2 «¨æ¥§¨ï
|
||||
; ¯®á«¥¤ïï ¬®¤¨ä¨ª æ¨ï 12.09.2017 IgorA
|
||||
; ¯®á«¥¤ïï ¬®¤¨ä¨ª æ¨ï 12.01.2021 IgorA
|
||||
|
||||
|
||||
struct TreeNode
|
||||
@@ -243,7 +243,11 @@ push eax ebx
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON_EXT
|
||||
test eax,$01000000
|
||||
jz @f
|
||||
cmp tl_on_press,0
|
||||
je @f
|
||||
call tl_on_press
|
||||
add esp,8
|
||||
popad
|
||||
ret
|
||||
@@:
|
||||
bt eax,0 ;left mouse button press
|
||||
@@ -299,16 +303,14 @@ pop ebx eax
|
||||
jl .no_open_close ;ªãàá®à á⮨⠯ãá⮬ ¬¥áâ¥, ¡¥§ ã§«®¢
|
||||
imul eax,sizeof.TreeNode
|
||||
add eax,tl_data_nodes
|
||||
xor bx,bx
|
||||
mov bl,byte[eax+TreeNode.level] ;á®åà 塞 ã஢¥ì ⥪ã饣® ã§«
|
||||
movzx bx,byte[eax+TreeNode.level] ;á®åà 塞 ã஢¥ì ⥪ã饣® ã§«
|
||||
inc bx ;+ ¯®«¥ ¤«ï ªãàá®à
|
||||
|
||||
cmp si,tl_img_cx
|
||||
jl .no_open_close ;¬ë襩 ¯®¯ «¨ «¥¢®¥ ¯®«¥ ¤«ï ªãàá®à , £¤¥ â®ç® ¥â '+' ¨ '-'
|
||||
mov eax,esi
|
||||
xor edx,edx
|
||||
xor ecx,ecx
|
||||
mov cx,tl_img_cx
|
||||
movzx ecx,tl_img_cx
|
||||
div ecx
|
||||
|
||||
cmp ax,bx
|
||||
|
||||
Reference in New Issue
Block a user