forked from KolibriOS/kolibrios
element 't_edit' fix function 'ted_on_open_file'
git-svn-id: svn://kolibrios.org@2348 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5ed633942d
commit
4a23260a83
@ -817,15 +817,16 @@ proc ted_on_open_file
|
|||||||
add eax,2
|
add eax,2
|
||||||
mov dword [eax],0 ; first sumbol 'perv=0'
|
mov dword [eax],0 ; first sumbol 'perv=0'
|
||||||
|
|
||||||
mov edx,ted_tex
|
mov edx,ted_tex ; áâனª¨ ç «ì®£® á«ã¦¥¡®£® ᨬ¢®«
|
||||||
; begining sumbol 'perv=0' 'next=2'
|
; begining sumbol 'perv=0' 'next=2'
|
||||||
mov dword [edx+2],0
|
mov dword [edx+2],0
|
||||||
mov dword [edx+6],2
|
mov dword [edx+6],2
|
||||||
|
|
||||||
add edx,sizeof.symbol
|
add edx,sizeof.symbol ; áâனª¨ ª®¥ç®£® á«ã¦¥¡®£® ᨬ¢®«
|
||||||
mov dword [edx+6],0 ; last sumbol 'next=0'
|
mov dword [edx+6],0 ; last sumbol 'next=0'
|
||||||
mov dword [edx+2],ebx ; last sumbol 'perv=last'
|
mov dword [edx+2],ebx ; last sumbol 'perv=last'
|
||||||
inc dword [edx+2]
|
inc dword [edx+2]
|
||||||
|
mov dword [edx+10],0 ; áâ ¢¨¬ ¢à¥¬ï ᮧ¤ ¨ï à ¢®¥ 0, çâ® ¡ë ᨬ¢®« ¯à ¢¨«ì® ®¡à ¡ âë¢ «áï ¯à¨ ®âªàë⨨ ä ©«®¢ ¡®«ìè¨å 28 ¡ ©â
|
||||||
|
|
||||||
mov edx,ebx
|
mov edx,ebx
|
||||||
inc edx ;2 = rezerv sumbols
|
inc edx ;2 = rezerv sumbols
|
||||||
@ -1897,62 +1898,65 @@ ted_get_num_lines:
|
|||||||
; ®â¬¥ï¥â ®â¬¥¥ë¥ ¤¥©á⢨ï, ¯¥à¥¤ ¨§¬¥¥¨¥¬ ¤®ªã¬¥â
|
; ®â¬¥ï¥â ®â¬¥¥ë¥ ¤¥©á⢨ï, ¯¥à¥¤ ¨§¬¥¥¨¥¬ ¤®ªã¬¥â
|
||||||
align 4
|
align 4
|
||||||
proc ted_set_undo
|
proc ted_set_undo
|
||||||
mov ted_drag_k,0 ;§ ª 稢 ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë
|
mov ted_drag_k,0 ;§ ª 稢 ¥¬ ¢ë¤¥«¥¨¥ ®â ª« ¢¨ âãàë
|
||||||
cmp ted_tim_undo,1
|
cmp ted_tim_undo,1
|
||||||
jl .no_work
|
jl .no_work
|
||||||
|
|
||||||
push eax ebx edx
|
push eax ebx edx
|
||||||
mov edx,ted_tex
|
mov edx,ted_tex
|
||||||
call ted_get_text_next_pos ;long i=tex[0].next;
|
call ted_get_text_next_pos ;long i=tex[0].next;
|
||||||
mov eax,ted_tim_undo
|
mov eax,ted_tim_undo
|
||||||
sub ted_tim_ch,eax ;ted_tim_ch-=ted_tim_undo;
|
sub ted_tim_ch,eax ;ted_tim_ch-=ted_tim_undo;
|
||||||
mov eax,ted_tim_ch
|
mov eax,ted_tim_ch
|
||||||
cmp ted_tim_ls,eax ;if(ted_tim_ls>ted_tim_ch)
|
cmp ted_tim_ls,eax ;if(ted_tim_ls>ted_tim_ch)
|
||||||
jle @f
|
jle @f
|
||||||
mov ted_tim_ls,0
|
mov ted_tim_ls,0
|
||||||
@@:
|
@@:
|
||||||
cmp edx,ted_tex
|
cmp edx,ted_tex_1
|
||||||
je @f
|
jle @f
|
||||||
|
|
||||||
;if(tex[i].tc>ted_tim_ch){ // ¥á«¨ ᮧ¤ ¨¥ ᨬ¢®« ¡ë«® ®â¬¥¥®
|
;if(tex[i].tc>ted_tim_ch){ // ¥á«¨ ᮧ¤ ¨¥ ᨬ¢®« ¡ë«® ®â¬¥¥®
|
||||||
cmp [edx+10],eax
|
cmp [edx+10],eax
|
||||||
jle .no_u1
|
jle .no_u1
|
||||||
mov dword [edx+10],0
|
mov dword [edx+10],0
|
||||||
mov dword [edx+14],0
|
mov dword [edx+14],0
|
||||||
|
|
||||||
mov ebx,[edx+2]
|
mov ebx,[edx+2]
|
||||||
imul ebx,sizeof.symbol
|
imul ebx,sizeof.symbol
|
||||||
add ebx,ted_tex;.next
|
add ebx,ted_tex ;ebx=tex[i].perv
|
||||||
m2m dword [ebx+6],dword [edx+6] ;tex[tex[i].perv].next=tex[i].next;
|
m2m dword [ebx+6],dword [edx+6] ;tex[tex[i].perv].next=tex[i].next;
|
||||||
|
|
||||||
mov ebx,[edx+6]
|
mov ebx,[edx+6]
|
||||||
imul ebx,sizeof.symbol
|
imul ebx,sizeof.symbol
|
||||||
add ebx,ted_tex;.perv
|
add ebx,ted_tex ;ebx=tex[i].next
|
||||||
m2m dword [ebx+2],dword [edx+2] ;tex[tex[i].next].perv=tex[i].perv;
|
m2m dword [ebx+2],dword [edx+2] ;tex[tex[i].next].perv=tex[i].perv;
|
||||||
|
|
||||||
cmp ted_ptr_free_symb,edx
|
cmp ted_ptr_free_symb,edx
|
||||||
jle .no_u1
|
jle .no_cor_free
|
||||||
mov ted_ptr_free_symb,edx ;¬¥ï¥¬ 㪠§ ⥫ì ᢮¡®¤ë© ᨬ¢®«, ¤«ï ¡®«¥¥ ¡ëáâண® ¯®¨áª ¯ ¬ïâ¨
|
mov ted_ptr_free_symb,edx ;¬¥ï¥¬ 㪠§ ⥫ì ᢮¡®¤ë© ᨬ¢®«, ¤«ï ¡®«¥¥ ¡ëáâண® ¯®¨áª ¯ ¬ïâ¨
|
||||||
.no_u1:
|
.no_cor_free:
|
||||||
|
mov edx,ebx ;®¯â¨¬¨§¨à㥬 ¯® ᪮à®á⨠(edx ¯®á«¥ ¢ë§®¢ ted_get_text_next_pos ¡ã¤¥â à ¢¥ ebx)
|
||||||
|
jmp @b
|
||||||
|
.no_u1:
|
||||||
|
|
||||||
;else if(tex[i].td>ted_tim_ch) tex[i].td=0; // ¥á«¨ 㤠«¥¨¥ ᨬ¢®« ¡ë«® ®â¬¥¥®
|
;else if(tex[i].td>ted_tim_ch) tex[i].td=0; // ¥á«¨ 㤠«¥¨¥ ᨬ¢®« ¡ë«® ®â¬¥¥®
|
||||||
cmp [edx+14],eax
|
cmp [edx+14],eax
|
||||||
jle .no_u2
|
jle .no_u2
|
||||||
mov dword [edx+14],0
|
mov dword [edx+14],0
|
||||||
.no_u2:
|
.no_u2:
|
||||||
|
|
||||||
call ted_get_text_next_pos
|
call ted_get_text_next_pos
|
||||||
jmp @b
|
jmp @b
|
||||||
@@:
|
@@:
|
||||||
mov ted_tim_undo,0
|
mov ted_tim_undo,0
|
||||||
mov eax,ted_tim_co
|
mov eax,ted_tim_co
|
||||||
cmp ted_tim_ch,eax
|
cmp ted_tim_ch,eax
|
||||||
jge @f
|
jge @f
|
||||||
mov ted_tim_co,0
|
mov ted_tim_co,0
|
||||||
@@:
|
@@:
|
||||||
pop edx ebx eax
|
pop edx ebx eax
|
||||||
.no_work:
|
.no_work:
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
;input:
|
;input:
|
||||||
|
Loading…
Reference in New Issue
Block a user