From: nicm Date: Tue, 30 May 2017 08:13:48 +0000 (+0000) Subject: Preserve search string when entering prompt again. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a3ca0b110ca7beb2d27d040d894d992ca6157c14;p=openbsd Preserve search string when entering prompt again. --- diff --git a/usr.bin/tmux/key-bindings.c b/usr.bin/tmux/key-bindings.c index 54be699a0db..ff5530fd748 100644 --- a/usr.bin/tmux/key-bindings.c +++ b/usr.bin/tmux/key-bindings.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-bindings.c,v 1.78 2017/05/10 10:46:59 nicm Exp $ */ +/* $OpenBSD: key-bindings.c,v 1.79 2017/05/30 08:13:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -244,8 +244,8 @@ key_bindings_init(void) "bind -Tcopy-mode C-k send -X copy-end-of-line", "bind -Tcopy-mode C-n send -X cursor-down", "bind -Tcopy-mode C-p send -X cursor-up", - "bind -Tcopy-mode C-r command-prompt -ip'search up' 'send -X search-backward-incremental \"%%%\"'", - "bind -Tcopy-mode C-s command-prompt -ip'search down' 'send -X search-forward-incremental \"%%%\"'", + "bind -Tcopy-mode C-r command-prompt -ip'search up' -I'#{pane_search_string}' 'send -X search-backward-incremental \"%%%\"'", + "bind -Tcopy-mode C-s command-prompt -ip'search down' -I'#{pane_search_string}' 'send -X search-forward-incremental \"%%%\"'", "bind -Tcopy-mode C-v send -X page-down", "bind -Tcopy-mode C-w send -X copy-selection-and-cancel", "bind -Tcopy-mode Escape send -X cancel",