From 4e718506e3591922a5c6f99540e0ce35b7680995 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 3 Jun 2021 10:04:30 +0200 Subject: [PATCH] Vi-bindings: Use fish_clipboard_copy This has one slight behavioral change: Even with xsel, it now copies to the clipboard, not the primary. I would imagine anyone who cares about the primary selection has customized fish_clipboard_copy and because we never got a bug about this not supporting anything but xsel (and errorring out if it's not available!) this is probably unused. So now we support all the clipboard integration things, and we use the clipboard. --- share/functions/fish_vi_key_bindings.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index e11597238..7adab45c9 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -307,7 +307,7 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' bind -s --preset -M visual -m default x kill-selection end-selection repaint-mode bind -s --preset -M visual -m default X kill-whole-line end-selection repaint-mode bind -s --preset -M visual -m default y kill-selection yank end-selection repaint-mode - bind -s --preset -M visual -m default '"*y' "commandline -s | xsel -p; commandline -f end-selection repaint-mode" + bind -s --preset -M visual -m default '"*y' "fish_clipboard_copy; commandline -f end-selection repaint-mode" bind -s --preset -M visual -m default '~' togglecase-selection end-selection repaint-mode bind -s --preset -M visual -m default \cc end-selection repaint-mode