diff --git a/programs/develop/tinypad/trunk/data/tp-udata.inc b/programs/develop/tinypad/trunk/data/tp-udata.inc index 587db212b4..c6486c08f8 100644 --- a/programs/develop/tinypad/trunk/data/tp-udata.inc +++ b/programs/develop/tinypad/trunk/data/tp-udata.inc @@ -97,6 +97,7 @@ bot_mode db ? bot_mode2 db ? popup_valid_text db ? +replace_mode db ? align 4 diff --git a/programs/develop/tinypad/trunk/tp-dialog.asm b/programs/develop/tinypad/trunk/tp-dialog.asm index b8eb83110b..7b7d256b7d 100644 --- a/programs/develop/tinypad/trunk/tp-dialog.asm +++ b/programs/develop/tinypad/trunk/tp-dialog.asm @@ -675,7 +675,9 @@ botdlg.button: push [cur_editor.SelStart.X] mov ebp,cur_editor call init_sel_vars + mov [replace_mode],1 call key.ctrl_v + mov [replace_mode],0 pop [cur_editor.SelStart.X] stdcall mem.Free,[copy_buf] diff --git a/programs/develop/tinypad/trunk/tp-key.asm b/programs/develop/tinypad/trunk/tp-key.asm index f3cd6bdb6b..ac1a68a6d8 100644 --- a/programs/develop/tinypad/trunk/tp-key.asm +++ b/programs/develop/tinypad/trunk/tp-key.asm @@ -584,8 +584,10 @@ endp ;----------------------------------------------------------------------------- proc key.ctrl_v + cmp [replace_mode],0 + jne @f call get_from_clipboard - +@@: cmp [copy_size],0 je .exit @@ -691,6 +693,9 @@ proc key.ctrl_v mov [cur_editor.Modified],1 .exit: + cmp [replace_mode],0 + jne .exit_1 + cmp [copy_size],0 je .exit_1 ; remove unnecessary memory area