patch 9.1.0767: A condition is always true in ex_getln.c
Problem: A cmdlen == 0 condition is always true as ccline.cmdlen == 0
was already checked above (after v9.1.0766).
Solution: Remove the condition and the variable.
(zeertzjq)
closes: #15830
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/ex_getln.c b/src/ex_getln.c
index da2a8c7..980faf8 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1092,10 +1092,6 @@
else if (ccline.cmdlen == 0 && c != Ctrl_W
&& ccline.cmdprompt == NULL && indent == 0)
{
-#ifdef FEAT_SEARCH_EXTRA
- int cmdlen;
-#endif
-
// In ex and debug mode it doesn't make sense to return.
if (exmode_active
#ifdef FEAT_EVAL
@@ -1104,9 +1100,6 @@
)
return CMDLINE_NOT_CHANGED;
-#ifdef FEAT_SEARCH_EXTRA
- cmdlen = ccline.cmdlen;
-#endif
dealloc_cmdbuff(); // no commandline to return
if (!cmd_silent)
@@ -1120,8 +1113,7 @@
msg_putchar(' '); // delete ':'
}
#ifdef FEAT_SEARCH_EXTRA
- if (cmdlen == 0)
- isp->search_start = isp->save_cursor;
+ isp->search_start = isp->save_cursor;
#endif
redraw_cmdline = TRUE;
return GOTO_NORMAL_MODE;