Yegappan wrote:

> When deleting all the characters in a line with virtual text at the
> end, the virtual
> text is not removed.  Instead the virtual text is attached to the next line:
> 
> ------------------------------------------------------------------------------------
> new
> call setline(1, ["one", "two"])
> call prop_type_add("MyProp", #{bufnr: bufnr(), highlight: 'Search'})
> call prop_add(1, 0, #{type: "MyProp", text: "test", length: 4})
> normal v$x
> ------------------------------------------------------------------------------------
> 
> After sourcing the above script, I expected the buffer to contain only
> the line "two" but it has "two" followed by the virtual text "test".

It's not Visual mode, using "D" does the same.

-- 
hundred-and-one symptoms of being an internet addict:
222. You send more than 20 personal e-mails a day.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220801201909.C73BA1C0656%40moolenaar.net.

Raspunde prin e-mail lui