From 77f93f61c5ee6fea9131a1791bd3b106b4b8da4f Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Thu, 7 Jan 2016 11:06:12 +0100 Subject: znt: optimizations for zsh<=5.2, use $BUFFER if cmd is not from history --- plugins/zsh-navigation-tools/n-list-input | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/zsh-navigation-tools/n-list-input') diff --git a/plugins/zsh-navigation-tools/n-list-input b/plugins/zsh-navigation-tools/n-list-input index 380acdc00..957cd5a0b 100644 --- a/plugins/zsh-navigation-tools/n-list-input +++ b/plugins/zsh-navigation-tools/n-list-input @@ -44,7 +44,7 @@ case "$key" in [ "$current_idx" -lt "$last_element" ] && current_idx=current_idx+1; _nlist_compute_first_to_show_idx ;; - (PPAGE) + (PPAGE|$'\b'|$'\C-?'|BACKSPACE) current_idx=current_idx-page_height [ "$current_idx" -lt 1 ] && current_idx=1; _nlist_compute_first_to_show_idx @@ -72,7 +72,7 @@ case "$key" in current_idx=last_element _nlist_compute_first_to_show_idx ;; - ($'\n') + ($'\n'|ENTER) # Is that element selectable? # Check for this only when there is no search if [[ "$NLIST_SEARCH_BUFFER" != "" || "$NLIST_IS_UNIQ_MODE" -eq 1 || @@ -137,7 +137,7 @@ esac else case "$key" in - ($'\n') + ($'\n'|ENTER) search=0 _nlist_cursor_visibility 0 ;; -- cgit v1.2.3-70-g09d2