From 8d0e7272003d6a0e8f51747b41348055f2449fef Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sun, 22 May 2016 13:09:48 +0200 Subject: [PATCH] Different marking of current history entry --- history-search-multi-word | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/history-search-multi-word b/history-search-multi-word index 73f5187..49851bc 100644 --- a/history-search-multi-word +++ b/history-search-multi-word @@ -65,10 +65,13 @@ _zhcw_main() { # All entries should have multilines replaced disp_list=( "${(@)disp_list//$'\n'/\\n}" ) - # ... and truncated to display width - disp_list=( "${(@)disp_list/(#m)*/${MATCH[1,COLUMNS-6]}}" ) + # ... and truncated to display width, and + # also preceeded by two spaces + disp_list=( "${(@)disp_list/(#m)*/ ${MATCH[1,COLUMNS-8]}}" ) - disp_list[on_page_idx]="> ${disp_list[on_page_idx]} <" + local entry="${disp_list[on_page_idx]}" + entry[1]='>' + disp_list[on_page_idx]="$entry" zle -M -- \ "Searching for '$BUFFER'. "\