Fix spurious incremental search when incsearch=false
Regressed in a2c41593a
(Fix partial regex text being pushed in history,
2023-11-02).
This commit is contained in:
parent
6babba9bfa
commit
c597a056d0
|
@ -860,7 +860,9 @@ void regex_prompt(Context& context, String prompt, char reg, T func)
|
||||||
{
|
{
|
||||||
case PromptEvent::Abort: return;
|
case PromptEvent::Abort: return;
|
||||||
case PromptEvent::Change:
|
case PromptEvent::Change:
|
||||||
if (incsearch and not str.empty())
|
if (not incsearch)
|
||||||
|
return;
|
||||||
|
if (not str.empty())
|
||||||
RegisterManager::instance()[reg].set(context, str.str());
|
RegisterManager::instance()[reg].set(context, str.str());
|
||||||
break;
|
break;
|
||||||
case PromptEvent::Validate:
|
case PromptEvent::Validate:
|
||||||
|
|
1
test/regression/0-no-incsearch/cmd
Normal file
1
test/regression/0-no-incsearch/cmd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
|
3
test/regression/0-no-incsearch/in
Normal file
3
test/regression/0-no-incsearch/in
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
x1
|
||||||
|
x2
|
1
test/regression/0-no-incsearch/kak_selection
Normal file
1
test/regression/0-no-incsearch/kak_selection
Normal file
|
@ -0,0 +1 @@
|
||||||
|
x1
|
1
test/regression/0-no-incsearch/rc
Normal file
1
test/regression/0-no-incsearch/rc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
set-option global incsearch false
|
6
test/regression/0-no-incsearch/script
Normal file
6
test/regression/0-no-incsearch/script
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
ui_out -ignore 4
|
||||||
|
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "/x" ] }'
|
||||||
|
sleep 0.1
|
||||||
|
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ ".<ret>" ] }'
|
||||||
|
sleep 0.1
|
||||||
|
ui_out -ignore 1
|
Loading…
Reference in New Issue
Block a user