delete selection before paste and no copy\cut if no selection

git-svn-id: svn://kolibrios.org@6994 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
0CodErr 2017-09-18 18:59:24 +00:00
parent 41f83a1c75
commit 4765b12e72

View File

@ -420,10 +420,14 @@ restore DstSize
restore TmpBuf
;----------------------------------------
edit_box_key.ctrl_x:
test word ed_flags,ed_shift_on
jz edit_box.editbox_exit
push dword 'X' ; this value need below to determine which action is used
jmp edit_box_key.ctrl_c.pushed
edit_box_key.ctrl_c:
test word ed_flags,ed_shift_on
jz edit_box.editbox_exit
push dword 'C' ; this value need below to determine which action is used
.pushed:
; add memory area
@ -503,6 +507,14 @@ edit_box_key.ctrl_v:
; check for cp866
cmp bl,1
jnz .no_valid_text
; if something selected then need to delete it
test word ed_flags,ed_shift_on
jz .selected_done
push eax; dummy parameter ; need to
push dword .selected_done ; correctly return
pushad ; from edit_box_key.delete
jmp edit_box_key.delete
.selected_done:
mov ecx,[eax]
sub ecx,3*4
; in ecx size of string to insert