@@ -52,10 +52,10 @@ typeset -g _history_substring_search_query_highlight
5252typeset -g _history_substring_search_result
5353typeset -g _history_substring_search_query
5454typeset -g -A _history_substring_search_raw_matches
55- typeset -g _history_substring_search_raw_match_index
55+ typeset -g -i _history_substring_search_raw_match_index
5656typeset -g -A _history_substring_search_matches
5757typeset -g -A _history_substring_search_unique_filter
58- typeset -g _history_substring_search_match_index
58+ typeset -g -i _history_substring_search_match_index
5959
6060# -----------------------------------------------------------------------------
6161# configuration variables
@@ -447,7 +447,7 @@ _history_substring_search_process_raw_matches() {
447447 #
448448 # Move on to the next raw entry and get its history index.
449449 #
450- (( _history_substring_search_raw_match_index++ ))
450+ _history_substring_search_raw_match_index+=1
451451 local index=${_history_substring_search_raw_matches[$_history_substring_search_raw_match_index]}
452452
453453 #
@@ -627,7 +627,7 @@ _history-substring-search-up-search() {
627627 # 1. Move index to point to the next match.
628628 # 2. Update display to indicate search found.
629629 #
630- (( _history_substring_search_match_index++ ))
630+ _history_substring_search_match_index+=1
631631 _history-substring-search-found
632632
633633 else
@@ -638,7 +638,7 @@ _history-substring-search-up-search() {
638638 # _history_substring_search_matches.
639639 # 2. Update display to indicate search not found.
640640 #
641- (( _history_substring_search_match_index++ ))
641+ _history_substring_search_match_index+=1
642642 _history-substring-search-not-found
643643 fi
644644
@@ -707,7 +707,7 @@ _history-substring-search-down-search() {
707707 # 1. Move index to point to the previous match.
708708 # 2. Update display to indicate search found.
709709 #
710- (( _history_substring_search_match_index-- ))
710+ _history_substring_search_match_index+=-1
711711 _history-substring-search-found
712712
713713 else
@@ -718,7 +718,7 @@ _history-substring-search-down-search() {
718718 # _history_substring_search_matches.
719719 # 2. Update display to indicate search not found.
720720 #
721- (( _history_substring_search_match_index-- ))
721+ _history_substring_search_match_index+=-1
722722 _history-substring-search-not-found
723723 fi
724724
0 commit comments