diff options
author | Chet Ramey <chet.ramey@case.edu> | 2020-11-03 14:36:06 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2020-11-03 14:36:06 -0500 |
commit | 278db80c368700ed6117fbd390c89a9b44c0240c (patch) | |
tree | fbb2773da6da4b7b8d0516731e3b6d31c4ff8c53 /lib/readline/isearch.c | |
parent | 5f2b5d79e0c0dd8f29e1d8e798675e33afbeda37 (diff) | |
download | bash-278db80c368700ed6117fbd390c89a9b44c0240c.tar.gz |
Bash-5.1-rc2 releasebash-5.1-rc2
Diffstat (limited to 'lib/readline/isearch.c')
-rw-r--r-- | lib/readline/isearch.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/readline/isearch.c b/lib/readline/isearch.c index 201a37bb..ef65e5f5 100644 --- a/lib/readline/isearch.c +++ b/lib/readline/isearch.c @@ -357,7 +357,7 @@ _rl_isearch_dispatch (_rl_search_cxt *cxt, int c) /* XXX - experimental code to allow users to bracketed-paste into the search string even when ESC is one of the isearch-terminators. Not perfect yet. */ - if (_rl_enable_bracketed_paste && c == ESC && strchr (cxt->search_terminators, c) && (n = _rl_nchars_available ()) > (2*BRACK_PASTE_SLEN-1)) + if (_rl_enable_bracketed_paste && c == ESC && strchr (cxt->search_terminators, c) && (n = _rl_nchars_available ()) > (BRACK_PASTE_SLEN-1)) { j = _rl_read_bracketed_paste_prefix (c); if (j == 1) @@ -418,9 +418,11 @@ add_character: { /* If we have a multibyte character, see if it's bound to something that affects the search. */ - if (cxt->mb[1]) +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && cxt->mb[1]) f = rl_function_of_keyseq (cxt->mb, cxt->keymap, (int *)NULL); else +#endif { f = cxt->keymap[c].function; if (f == rl_do_lowercase_version) @@ -680,7 +682,8 @@ opcode_dispatch: free (paste); break; } - rl_activate_mark (); + if (_rl_enable_active_region) + rl_activate_mark (); if (cxt->search_string_index + pastelen + 1 >= cxt->search_string_size) { cxt->search_string_size += pastelen + 2; @@ -805,7 +808,8 @@ opcode_dispatch: { cxt->prev_line_found = cxt->lines[cxt->history_pos]; rl_replace_line (cxt->lines[cxt->history_pos], 0); - rl_activate_mark (); + if (_rl_enable_active_region) + rl_activate_mark (); rl_point = cxt->sline_index; if (rl_mark_active_p () && cxt->search_string_index > 0) rl_mark = rl_point + cxt->search_string_index; |