From b15d8b249351e832fda9b02649efb1a47a5e3a43 Mon Sep 17 00:00:00 2001 From: Richard Reijmers CMC Date: Thu, 9 Feb 2023 16:55:16 +0100 Subject: [PATCH 1/2] Fixed bug where on terminal windows content of tmpfile was not pasted. --- snippy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippy b/snippy index b489481..cd0f9cf 100755 --- a/snippy +++ b/snippy @@ -392,7 +392,7 @@ run() { xdotool key ctrl+v sleep "$focus_wait" move_cursor "Up" $cursor_line_position else - xdotool key ctrl+shift+v + xdotool key ctrl+shift+v sleep "$focus_wait" if is_vim; then move_cursor "Up" $cursor_line_position fi From c4603aa267f4ad5acd85019f0e9d8558357790aa Mon Sep 17 00:00:00 2001 From: Richard Reijmers CMC Date: Thu, 9 Feb 2023 17:07:38 +0100 Subject: [PATCH 2/2] Introduced a small sleep time to allow sufficient time between the contents of tmpfile to be pasted if is_gui and restoring the previous clipboard. --- snippy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snippy b/snippy index cd0f9cf..7e19011 100755 --- a/snippy +++ b/snippy @@ -400,6 +400,9 @@ run() { move_cursor "Left" $cursor_position + # We need a little pause to handle the time to have the content of tmpfile pasted if is_gui + sleep "$focus_wait" + # Restore current clipboard echo -ne "$current_clipboard" | xsel --clipboard --input fi