Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7578 → Rev 7579

/programs/develop/libraries/box_lib/trunk/t_edit.asm
1,6 → 1,6
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 21.10.2018 IgorA
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 29.01.2019 IgorA
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
 
;input:
20,12 → 20,6
add out_reg,ted_key_words_data
}
 
TED_PANEL_NULL equ 0 ;­¥â ®âªàë⮩ ¯ ­¥«¨
TED_PANEL_FIND equ 1 ;¯ ­¥«ì ¯®¨áª 
TED_PANEL_SYNTAX equ 2 ;¯ ­¥«ì ¢ë¡®à  ä ©«®¢ ¯®¤á¢¥âª¨
TED_PANEL_REPLACE equ 3 ;¯ ­¥«ì § ¬¥­ë
TED_PANEL_WIDTH equ 150 ;è¨à¨­  ¯ ­¥«¨
 
TED_LINES_IN_NEW_FILE equ 30 ;ç¨á«® áâப ¢ ­®¢®¬ ä ©«¥
MAX_COLOR_WORD_LEN equ 40
;------------------------------------------------------------------------------
241,38 → 235,44
test esi,KM_CTRL ;Ctrl+...
jz .key_Ctrl
; *** ¢ë§®¢ ¢­¥è­¨å ä㭪権 ª®â®àë¥ âॡãîâ ®ª­  ®âªàëâ¨ï/á®åà ­¥­¨ï/¯®¨áª /...
cmp ted_fun_on_key_ctrl_all,0
je .end0
xor al,al
cmp ah,24 ;Ctrl+O
jne @f
cmp ted_fun_on_key_ctrl_o,0
je .end_key_fun
call ted_fun_on_key_ctrl_o
mov al,'O'
@@:
cmp ah,31 ;Ctrl+S
jne .end_ctrl_s
cmp ted_fun_on_key_ctrl_s,0
je .end_key_fun
xor eax,eax
test esi,KM_SHIFT
jz @f
inc eax
jne @f
mov al,'S'
@@:
call ted_fun_on_key_ctrl_s
jmp .end_key_fun
.end_ctrl_s:
cmp ah,33 ;Ctrl+F
jne @f
cmp ted_panel_id,TED_PANEL_FIND
je @f
cmp ted_fun_on_key_ctrl_f,0
je .end_key_fun
call ted_fun_on_key_ctrl_f
mov al,'F'
@@:
cmp ah,34 ;Ctrl+G
jne @f
mov al,'G'
@@:
cmp ah,35 ;Ctrl+H
jne @f
mov al,'H'
@@:
cmp ah,49 ;Ctrl+N
jne @f
cmp ted_fun_on_key_ctrl_n,0
je .end_key_fun
call ted_fun_on_key_ctrl_n
mov al,'N'
@@:
or al,al
jz .end0
and eax,0xff
test esi,KM_SHIFT
jz @f
or eax,0x100
@@:
stdcall ted_fun_on_key_ctrl_all, eax
jmp .end_key_fun
.end0:
 
; *** ¢ë§®¢ ¢­ãâ७­¨å ä㭪権
cmp ah,30 ;Ctrl+A
jne @f
441,7 → 441,7
 
cmp dword[table],0
je @f
stdcall KeyConvertToASCII, dword[table]
stdcall KeyConvertToASCII, [table]
@@:
 
;mov ted_drag_k,0 ;§ ª ­ç¨¢ ¥¬ ¢ë¤¥«¥­¨¥ ®â ª« ¢¨ âãàë
1169,7 → 1169,7
; *** ¢áâ ¢ª  ⥪ã饣® ᨬ¢®«  ¨§ áâப¨ ***
mov ecx,ted_opt_ed_change_time
not ecx
and dword[add_opt],ecx ;n_tim=false;
and [add_opt],ecx ;n_tim=false;
 
mov cl,byte [esi] ;tex[i].c=ta[ns];
mov byte [edx],cl
2046,7 → 2046,39
ret
endp
 
;description:
; ¯¥à¥å®¤ ­  㪠§ ­­ãî ¯®§¨æ¨î
;input:
; row = ­®¬¥à áâப¨
; col = ᨬ¢®«
align 16
proc ted_go_to_position uses ecx edx edi, edit:dword, row:dword, col:dword
mov edi,[edit]
; ¯®¤£®â®¢ª  áâப¨
mov edx,[row]
call ted_get_num_lines
cmp edx,eax
jle @f
mov edx,eax ;®£à ­¨ç¥­¨¥ ¯® áâப¥ max
@@:
dec edx
cmp edx,0
jge @f
xor edx,edx ;®£à ­¨ç¥­¨¥ ¯® áâப¥ min
@@:
; ¯®¤£®â®¢ª  ᨬ¢®« 
mov ecx,[col]
dec ecx
cmp ecx,0
jge @f
xor ecx,ecx
@@:
call ted_go_to_pos
stdcall ted_draw,edi
ret
endp
 
;input:
; ecx = Col
; edx = Row
; edi = pointer to tedit struct
3498,14 → 3530,10
inc bx
int 0x40
 
cmp ted_fun_draw_panel_find,0
cmp ted_fun_draw_panels,0
je @f
call ted_fun_draw_panel_find
stdcall ted_fun_draw_panels, edi
@@:
cmp ted_fun_draw_panel_syntax,0
je @f
call ted_fun_draw_panel_syntax
@@:
popad
ret
endp
3515,7 → 3543,6
align 16
proc ted_draw_main_cursor
pushad
 
mov eax,SF_DRAW_RECT ;draw cursor
mov ecx,ted_wnd_t ;calc rect -> y0,y1
add ecx,ted_rec_t
3811,8 → 3838,7
align 16
proc KeyConvertToASCII uses ebx, table:dword
mov ebx,[table] ;convert scan to ascii
ror ax,8
xor ah,ah
shr ax,8
add bx,ax ;? ebx,eax
mov ah,byte[ebx]
ret