On 2024-05-12, lkintact wrote: > Steps to reproduce > > 1. Run gvim.exe --clean. > 2. Execute :set showbreak=>. > 3. Execute :set laststatus=2 to enable the status line. > 4. Execute :set statusline=%v. > 5. Type 1000ia<Esc> to put 1000 letters "a" in the buffer. Note that the > status line reports "1012". > > Expected behaviour > > The status line should report "1000". > > Version of Vim > > 9.1.296. > > Environment > > OS: Windows 10 Home. > Terminal: GUI.
The number 1012 is correct. The statement closest to a definition of "virtual column" I could find in Vim's help is in ":help wincol()": The result is a Number, which is the virtual column of the cursor in the window. This is counting screen cells from the left side of the window. The leftmost column is one. A 1000-character line displayed in an 80-column window will wrap 12 times. Each time it wraps, Vim inserts the single-character 'showbreak' string, increasing the number of virtual columns occupied by the text by one each time. This is most easily seen at the end of the first screen line, column 80. With the cursor at column 80, the status line shows "80". Type l to move the cursor one character position to the right. The status line now shows "82". The cursor has moved to character position 81 but to virtual column 82 because that count includes the ">" at the left edge of the screen. HTH, Gary -- -- 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/20240512162443.GG24132%40phoenix.