1
0
forked from aniani/vim

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>
This commit is contained in:
zeertzjq
2024-10-08 21:04:19 +02:00
committed by Christian Brabandt
parent cb1d1dcc87
commit c9aa6e4f2a
3 changed files with 4 additions and 10 deletions

View File

@@ -1092,10 +1092,6 @@ cmdline_erase_chars(
else if (ccline.cmdlen == 0 && c != Ctrl_W else if (ccline.cmdlen == 0 && c != Ctrl_W
&& ccline.cmdprompt == NULL && indent == 0) && ccline.cmdprompt == NULL && indent == 0)
{ {
#ifdef FEAT_SEARCH_EXTRA
int cmdlen;
#endif
// In ex and debug mode it doesn't make sense to return. // In ex and debug mode it doesn't make sense to return.
if (exmode_active if (exmode_active
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
@@ -1104,9 +1100,6 @@ cmdline_erase_chars(
) )
return CMDLINE_NOT_CHANGED; return CMDLINE_NOT_CHANGED;
#ifdef FEAT_SEARCH_EXTRA
cmdlen = ccline.cmdlen;
#endif
dealloc_cmdbuff(); // no commandline to return dealloc_cmdbuff(); // no commandline to return
if (!cmd_silent) if (!cmd_silent)
@@ -1120,7 +1113,6 @@ cmdline_erase_chars(
msg_putchar(' '); // delete ':' msg_putchar(' '); // delete ':'
} }
#ifdef FEAT_SEARCH_EXTRA #ifdef FEAT_SEARCH_EXTRA
if (cmdlen == 0)
isp->search_start = isp->save_cursor; isp->search_start = isp->save_cursor;
#endif #endif
redraw_cmdline = TRUE; redraw_cmdline = TRUE;

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
767,
/**/ /**/
766, 766,
/**/ /**/