Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Our current virtual text implementation for vim emulates it by abusing the textprop and popupwin feature from vim 8.2 (for more details see commit 708e810). This implementation sometimes is janky, for example the popups may leak into other vim windows next to the current window. Luckily, vim just got native virtual-text support as a proper subtype to the prop_add() function. By using the 'text' option, the text property automatically becomes virtual text that is appended to the current line if col is zero. Note that the prop_add() method now returns negative IDs for virtual text properties. This feature was added in vim 9.0.0067, but it is still getting bugfixes which is why we only use this new API if vim has at least version 9.0.0201. However, there are still some minor bugs with vim's native virtual text, so we might have to bump the version check again in the future. Also see #3906. Now with proper virtual text support for both vim and neovim available, we can tackle #2962 in the future by simply tracking multiple virt-texts instead of just the last one. In the future we might also want to disable our virtual text emulation support for vim, as it is a total hack, but for now we should keep it for backwards compatibility.
- Loading branch information