From 4765b12e722cf164583edb9defd2d337f8d686f9 Mon Sep 17 00:00:00 2001 From: 0CodErr <0CodErr@kolibrios.org> Date: Mon, 18 Sep 2017 18:59:24 +0000 Subject: [PATCH] delete selection before paste and no copy\cut if no selection git-svn-id: svn://kolibrios.org@6994 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/libraries/box_lib/trunk/editbox.asm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/programs/develop/libraries/box_lib/trunk/editbox.asm b/programs/develop/libraries/box_lib/trunk/editbox.asm index 2563f53c2a..4488cd6c81 100644 --- a/programs/develop/libraries/box_lib/trunk/editbox.asm +++ b/programs/develop/libraries/box_lib/trunk/editbox.asm @@ -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