summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-02-11 10:34:07 +0000
committerBram Moolenaar <Bram@vim.org>2023-02-11 10:34:07 +0000
commit412e0e4ed903682f352d8ea58ded480930cc664f (patch)
tree86197bc61bb5741674ec9af8fdeade39d0fda6fb /src/ex_getln.c
parentc4b7dec38292fe1cfad7aa5f244031fc6f7c7a09 (diff)
patch 9.0.1299: change for triggering incsearch not sufficiently testedv9.0.1299
Problem: Change for triggering incsearch not sufficiently tested. Solution: Add a test case. Simplify the code. (closes #11971)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index d40f923382..b2bf4ed329 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1253,9 +1253,9 @@ cmdline_insert_reg(int *gotesc UNUSED)
// remove the double quote
redrawcmd();
- // The text has been stuffed, the command line didn't change yet, but it
- // will change soon. The caller must take care of it.
- return literally ? CMDLINE_NOT_CHANGED : CMDLINE_CHANGED;
+ // With "literally": the command line has already changed.
+ // Else: the text has been stuffed, but the command line didn't change yet.
+ return literally ? CMDLINE_CHANGED : CMDLINE_NOT_CHANGED;
}
/*
@@ -2086,10 +2086,8 @@ getcmdline_int(
res = cmdline_insert_reg(&gotesc);
if (res == GOTO_NORMAL_MODE)
goto returncmd;
-#ifdef FEAT_SEARCH_EXTRA
- if (res == CMDLINE_NOT_CHANGED)
- is_state.incsearch_postponed = TRUE;
-#endif
+ if (res == CMDLINE_CHANGED)
+ goto cmdline_changed;
goto cmdline_not_changed;
case Ctrl_D: