-*todo.txt* For Vim version 9.2. Last change: 2026 Jun 23
+*todo.txt* For Vim version 9.2. Last change: 2026 Jul 30
VIM REFERENCE MANUAL by Bram Moolenaar
because the typeahead was simplified when looking for a matching mapping.
Need to somehow undo the simplification. #12002
-Windows scroll when using the autocmd window. #12085
-in restore_snapshot_rec() restore more values from the snapshot, instead of
-calling frame_new_height() and frame_new_width(), especially w_topline and
-w_skipcol.
+Using the autocmd window resets w_skipcol when the cursor is in a long
+wrapped line. In restore_snapshot_rec() restore more values from the
+snapshot, instead of calling frame_new_height() and frame_new_width(),
+especially w_skipcol.
Check places that source "path/*.vim" to not match other extensions, e.g.
.vim9, on MS-Windows (short file name match, gets expanded to long file name).
/*
* Like plines_win(), but only reports the number of physical screen lines
- * used from the start of the line to the given column number.
+ * used from the start of the line to the given byte column.
*/
int
plines_win_col(win_T *wp, linenr_T lnum, long column)
line = ml_get_buf(wp->w_buffer, lnum, FALSE);
init_chartabsize_arg(&cts, wp, lnum, 0, line, line);
- while (*cts.cts_ptr != NUL && --column >= 0)
+ // "column" is a byte index, advance the pointer until it is reached.
+ while (*cts.cts_ptr != NUL && cts.cts_ptr < line + column)
{
cts.cts_vcol += win_lbr_chartabsize(&cts, NULL, NULL);
MB_PTR_ADV(cts.cts_ptr);
set splitkeep& cmdheight&
endfunc
+func Test_aucmd_win_scroll_multibyte()
+ " Using the autocommand window must not scroll the current window when the
+ " cursor is behind multi-byte characters.
+ set splitkeep=cursor
+ call setline(1, repeat([repeat(nr2char(0x3042), 200)], 20))
+ normal! G0100l
+ redraw
+ let topline = line('w0')
+
+ for i in range(3)
+ call bufload(bufadd(''))
+ endfor
+ call assert_equal(topline, line('w0'))
+
+ %bwipeout!
+ set splitkeep&
+endfunc
+
func Test_splitkeep_cursor()
CheckScreendump
let lines =<< trim END
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 880,
/**/
879,
/**/