Re: [vim/vim] textprop: wrong Tab size in a line with virtual text above it (PR #20901)

zeertzjq (Vim Github Repository) <[email protected]> Fri, 31 Jul 2026 17:58:49 -0700
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/pull/20901/[email protected]>
zeertzjq left a comment (vim/vim#20901)

This solution isn't sufficient and leads to another problem. If you have a Tab that's not the first char of the line (e.g. two leading Tabs):
```vim
123456789 123456789 123456789 123456789 123456789 12345678

        | space prefixed text
	| tab prefixed text
        | space prefixed text
		| double tab prefixed text


set tabstop=8
call prop_type_add("test", { 'highlight' : 'Error' })
call prop_clear(1, 99)
call prop_add(3, 0, { 'text_align' : 'above', 'text' : '|<-', 'type': 'test', 'text_padding_left' : 8 })
call prop_add(4, 0, { 'text_align' : 'above', 'text' : '|<-', 'type': 'test', 'text_padding_left' : 8 })
call prop_add(5, 0, { 'text_align' : 'above', 'text' : '        |<-', 'type': 'test'})
call prop_add(6, 0, { 'text_align' : 'above', 'text' : "\t|<-", 'type': 'test'})
```
With a window width of 75, if you type `6gg0fd`, you'll find that the cursor isn't placed on the `d`. Before this PR, the cursor is placed on the `d`, but the Tab size is incorrect.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/20901#issuecomment-5148724269
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/pull/20901/[email protected]>

-- 
-- 
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/vim/vim/pull/20901/c5148724269%40github.com.