update element 't_edit' when add new lines change scroll size

git-svn-id: svn://kolibrios.org@4987 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2014-06-27 11:52:25 +00:00
parent 352415e198
commit bb0466488a
2 changed files with 14 additions and 4 deletions

View File

@ -113,9 +113,10 @@
;---------------------------------------------------------------------
macro @use_library
{
local lp
local lp1
local lp2
local lp3
local lp4
local file_name
library_fun_memory_alloc equ 0 ;­¥ ¨á¯®«ì§®¢ âì ¢ ¬ ªà®á å ¯à®¢¥àªã ­  ä㭪樨 'lib_init'

View File

@ -1,6 +1,6 @@
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 28.01.2014 IgorA
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 27.06.2014 IgorA
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
;input:
@ -1103,6 +1103,9 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
call ted_get_num_lines
sub dword[new_lin],eax
;㢥«¨ç¨¢ ¥¬ «¨­¨¨ ¢ áªà®««¨­£¥ ­  ç¨á«® ¤®¡ ¢«¥­­ëå ¤®¯®«­¨â¥«ì­ëå áâப
mov ecx,ted_scr_w
add dword[ecx+sb_offs_max_area],eax ;㢥«¨ç¨¢ ¥¬ à §¬¥à ¢¥à⨪ «ì­®£® áªà®««¨­£ 
pop eax
@@:
@ -1128,8 +1131,12 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
jne .no_cur_mov
mov ted_cur_x,0
inc ted_cur_y
;㢥«¨ç¨¢ ¥¬ «¨­¨¨ ¢ áªà®««¨­£¥ ­  ç¨á«® ¤®¡ ¢«¥­­ëå ¢ ⥪á⥠áâப
mov ecx,ted_scr_w
inc dword[ecx+sb_offs_max_area] ;㢥«¨ç¨¢ ¥¬ à §¬¥à ¢¥à⨪ «ì­®£® áªà®««¨­£ 
.no_cur_mov:
; *** ¢áâ ¢ª  ⥪ã饣® ᨬ¢®«  ¨§ áâப¨ ***
mov ecx,ted_opt_ed_change_time
not ecx
and dword[add_opt],ecx ;n_tim=false;
@ -1152,6 +1159,8 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
add ecx,ted_tex ; *** ecx = tex[tex[i].next] ***
mov [ecx+2],eax ;tex[tex[i].next].perv=i;
; *** ¢áâ ¢ª  ¤®¯®«­¨â¥«ì­ëå áâப ¨ ¯à®¡¥«®¢
; ¥á«¨ ªãàá®à ¢® ¢à¥¬ï ¢áâ ¢ª¨ ­ å®¤¨«áï §  ⥪á⮬ ***
cmp dword[new_lin],0 ;add lines or text
jle .spc_add
dec dword[new_lin]
@ -1164,7 +1173,7 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
mov byte [edx],' '
jmp .u1f
.tex_add:
inc esi
inc esi ; ¯¥à¥å®¤ ª á«¥¤ãî饬㠢áâ ¢«ï¥¬®¬ã ᨬ¢®«ã
dec ebx
.u1f:
add edx,sizeof.symbol