patch 9.1.0767: A condition is always true in ex_getln.c

Commit: 
https://github.com/vim/vim/commit/c9aa6e4f2a040dc7f8411139d39d0463487100da
Author: zeertzjq <zeert...@outlook.com>
Date:   Tue Oct 8 21:04:19 2024 +0200

    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 <zeert...@outlook.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/ex_getln.c b/src/ex_getln.c
index da2a8c7b7..980faf856 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1092,10 +1092,6 @@ cmdline_erase_chars(
     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 @@ cmdline_erase_chars(
           )
            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 @@ cmdline_erase_chars(
            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;
diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim
index 122793c4d..c3525315f 100644
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -89,7 +89,7 @@ func Test_abclear_buffer()
         \        .. "!  foo           foobar", execute('abbrev'))
 
   abclear
-   call assert_equal("

No abbreviation found", execute('abbrev'))
+  call assert_equal("

No abbreviation found", execute('abbrev'))
 
   %bwipe
 endfunc
diff --git a/src/version.c b/src/version.c
index f09a60f3a..854865f6b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    767,
 /**/
     766,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1syFfl-003XDB-Lq%40256bit.org.

Raspunde prin e-mail lui