forked from KolibriOS/kolibrios
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:
parent
352415e198
commit
bb0466488a
@ -113,9 +113,10 @@
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
macro @use_library
|
macro @use_library
|
||||||
{
|
{
|
||||||
|
|
||||||
local lp
|
|
||||||
local lp1
|
local lp1
|
||||||
|
local lp2
|
||||||
|
local lp3
|
||||||
|
local lp4
|
||||||
local file_name
|
local file_name
|
||||||
|
|
||||||
library_fun_memory_alloc equ 0 ;¥ ¨á¯®«ì§®¢ âì ¢ ¬ ªà®á å ¯à®¢¥àªã äãªæ¨¨ 'lib_init'
|
library_fun_memory_alloc equ 0 ;¥ ¨á¯®«ì§®¢ âì ¢ ¬ ªà®á å ¯à®¢¥àªã äãªæ¨¨ 'lib_init'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
; ¬ ªà®á ¤«ï á¨á⥬®© ¡¨¡«¨®â¥ª¨ box_lib.obj
|
; ¬ ªà®á ¤«ï á¨á⥬®© ¡¨¡«¨®â¥ª¨ box_lib.obj
|
||||||
; í«¥¬¥â TextEditor ¤«ï Kolibri OS
|
; í«¥¬¥â TextEditor ¤«ï Kolibri OS
|
||||||
; ä ©« ¯®á«¥¤¨© à § ¨§¬¥ï«áï 28.01.2014 IgorA
|
; ä ©« ¯®á«¥¤¨© à § ¨§¬¥ï«áï 27.06.2014 IgorA
|
||||||
; ª®¤ ¯à¨¬¥¥ GPL2 «¨æ¥§¨ï
|
; ª®¤ ¯à¨¬¥¥ GPL2 «¨æ¥§¨ï
|
||||||
|
|
||||||
;input:
|
;input:
|
||||||
@ -1103,6 +1103,9 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
|
|||||||
|
|
||||||
call ted_get_num_lines
|
call ted_get_num_lines
|
||||||
sub dword[new_lin],eax
|
sub dword[new_lin],eax
|
||||||
|
;㢥«¨ç¨¢ ¥¬ «¨¨¨ ¢ áªà®««¨£¥ ç¨á«® ¤®¡ ¢«¥ëå ¤®¯®«¨â¥«ìëå áâப
|
||||||
|
mov ecx,ted_scr_w
|
||||||
|
add dword[ecx+sb_offs_max_area],eax ;㢥«¨ç¨¢ ¥¬ à §¬¥à ¢¥à⨪ «ì®£® áªà®««¨£
|
||||||
pop 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
|
jne .no_cur_mov
|
||||||
mov ted_cur_x,0
|
mov ted_cur_x,0
|
||||||
inc ted_cur_y
|
inc ted_cur_y
|
||||||
|
;㢥«¨ç¨¢ ¥¬ «¨¨¨ ¢ áªà®««¨£¥ ç¨á«® ¤®¡ ¢«¥ëå ¢ ⥪á⥠áâப
|
||||||
|
mov ecx,ted_scr_w
|
||||||
|
inc dword[ecx+sb_offs_max_area] ;㢥«¨ç¨¢ ¥¬ à §¬¥à ¢¥à⨪ «ì®£® áªà®««¨£
|
||||||
.no_cur_mov:
|
.no_cur_mov:
|
||||||
|
|
||||||
|
; *** ¢áâ ¢ª ⥪ã饣® ᨬ¢®« ¨§ áâப¨ ***
|
||||||
mov ecx,ted_opt_ed_change_time
|
mov ecx,ted_opt_ed_change_time
|
||||||
not ecx
|
not ecx
|
||||||
and dword[add_opt],ecx ;n_tim=false;
|
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] ***
|
add ecx,ted_tex ; *** ecx = tex[tex[i].next] ***
|
||||||
mov [ecx+2],eax ;tex[tex[i].next].perv=i;
|
mov [ecx+2],eax ;tex[tex[i].next].perv=i;
|
||||||
|
|
||||||
|
; *** ¢áâ ¢ª ¤®¯®«¨â¥«ìëå áâப ¨ ¯à®¡¥«®¢
|
||||||
|
; ¥á«¨ ªãàá®à ¢® ¢à¥¬ï ¢áâ ¢ª¨ 室¨«áï § ⥪á⮬ ***
|
||||||
cmp dword[new_lin],0 ;add lines or text
|
cmp dword[new_lin],0 ;add lines or text
|
||||||
jle .spc_add
|
jle .spc_add
|
||||||
dec dword[new_lin]
|
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],' '
|
mov byte [edx],' '
|
||||||
jmp .u1f
|
jmp .u1f
|
||||||
.tex_add:
|
.tex_add:
|
||||||
inc esi
|
inc esi ; ¯¥à¥å®¤ ª á«¥¤ãî饬㠢áâ ¢«ï¥¬®¬ã ᨬ¢®«ã
|
||||||
dec ebx
|
dec ebx
|
||||||
.u1f:
|
.u1f:
|
||||||
add edx,sizeof.symbol
|
add edx,sizeof.symbol
|
||||||
|
Loading…
Reference in New Issue
Block a user