From 90f7d4b081c4b79cbdc11782ef396ba743912f6e Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 10 Dec 2016 21:26:51 +0100 Subject: [PATCH] clipboard_paste: Require non-empty clipboard contents Fixes #3637. --- share/functions/fish_clipboard_paste.fish | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/functions/fish_clipboard_paste.fish b/share/functions/fish_clipboard_paste.fish index dc95e41d6..318b935d3 100644 --- a/share/functions/fish_clipboard_paste.fish +++ b/share/functions/fish_clipboard_paste.fish @@ -5,7 +5,9 @@ function fish_clipboard_paste # Only run `commandline` if `xsel` succeeded. # That way any xsel error is printed (to show e.g. a non-functioning X connection), # but we don't print the redundant (and overly verbose for this) commandline error. + # Also require non-empty contents to not clear the buffer. if set -l data (xsel --clipboard) + and test -n "$data" commandline -i -- $data end end