Skip to content

Commit 79d3619

Browse files
authored
Merge pull request #99 from d10n/fix-zsh-4.3-regressions
Fix zsh 4.3 regressions
2 parents 47a7d41 + 19cb0eb commit 79d3619

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zsh-history-substring-search.zsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ _history-substring-search-begin() {
239239
#
240240
_history_substring_search_query_parts=(${=_history_substring_search_query})
241241
else
242-
_history_substring_search_query_parts=(${_history_substring_search_query})
242+
_history_substring_search_query_parts=(${==_history_substring_search_query})
243243
fi
244244

245245
#
@@ -324,7 +324,7 @@ _history-substring-search-end() {
324324
for query_part in $_history_substring_search_query_parts; do
325325
local escaped_query_part=${query_part//(#m)[\][()|\\*?#<>~^]/\\$MATCH}
326326
# (i) get index of pattern
327-
local query_part_match_index=${${BUFFER:$highlight_start_index}[(i)(#$HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS)${escaped_query_part}]}
327+
local query_part_match_index="${${BUFFER:$highlight_start_index}[(i)(#$HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS)${escaped_query_part}]}"
328328
if [[ $query_part_match_index -le ${#BUFFER:$highlight_start_index} ]]; then
329329
highlight_start_index=$(( $highlight_start_index + $query_part_match_index ))
330330
highlight_end_index=$(( $highlight_start_index + ${#query_part} ))

0 commit comments

Comments
 (0)