Commit: patch 9.2.0927: curswant not set on 8g8

Christian Brabandt <[email protected]> Sun, 9 Aug 2026 17:30:05 +0200
Newsgroups gmane.editors.vim.devel
Message-ID <[email protected]>
patch 9.2.0927: curswant not set on 8g8

Commit: https://github.com/vim/vim/commit/7fe5cb35f988774745750f89d8adf215c060f57b
Author: Emilien Breton <[email protected]>
Date:   Sun Aug 9 15:07:19 2026 +0000

    patch 9.2.0927: curswant not set on 8g8
    
    Problem:  curswant not set on 8g8
    Solution: Set curswant, adjust tests (Emilien Breton)
    
    closes: #20979
    
    Signed-off-by: Emilien Breton <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/mbyte.c b/src/mbyte.c
index db58ad5d3..54ee229a1 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4461,6 +4461,7 @@ utf_find_illegal(void)
 			curwin->w_cursor.col += l;
 		    }
 		}
+		curwin->w_set_curswant = TRUE;
 		goto theend;
 	    }
 	    p += len;
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index d61796a93..ee529980c 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -2900,7 +2900,7 @@ func Test_normal_8g8()
   " With invalid byte.
   call setline(1, "___\xff___")
   norm! 1G08g8g
-  call assert_equal([0, 1, 4, 0, 1], getcurpos())
+  call assert_equal([0, 1, 4, 0, 4], getcurpos())
 
   " With invalid byte before the cursor.
   call setline(1, "___\xff___")
@@ -2910,12 +2910,12 @@ func Test_normal_8g8()
   " With truncated sequence.
   call setline(1, "___\xE2\x82___")
   norm! 1G08g8g
-  call assert_equal([0, 1, 4, 0, 1], getcurpos())
+  call assert_equal([0, 1, 4, 0, 4], getcurpos())
 
   " With overlong sequence.
   call setline(1, "___\xF0\x82\x82\xAC___")
   norm! 1G08g8g
-  call assert_equal([0, 1, 4, 0, 1], getcurpos())
+  call assert_equal([0, 1, 4, 0, 4], getcurpos())
 
   " With valid utf8.
   call setline(1, "café")
diff --git a/src/version.c b/src/version.c
index b0c9b0deb..f7e3dbc2a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    927,
 /**/
     926,
 /**/

-- 
-- 
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 [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1wt5TR-003pBi-Ih%40256bit.org.