diff options
author | Ibby <33922797+SleepySwords@users.noreply.github.com> | 2023-03-19 17:37:28 +1100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2023-05-22 13:49:42 +0200 |
commit | a38d7f99845d6ef566b2885737b892c660749d5e (patch) | |
tree | d0569d7d23e7375282321f7ccd47fa32911b9514 /test/functional | |
parent | efa9b299a7cb68909e9bcd290e4d12bcb6d0bb03 (diff) | |
download | rneovim-a38d7f99845d6ef566b2885737b892c660749d5e.tar.gz rneovim-a38d7f99845d6ef566b2885737b892c660749d5e.tar.bz2 rneovim-a38d7f99845d6ef566b2885737b892c660749d5e.zip |
fix(ui): fix cursor position with multiple inline virtual text
vim-patch9.0.0121: cannot put virtual text after or below a line
Problem: Cannot put virtual text after or below a line.
Solution: Add "text_align" and "text_wrap" arguments.
https://github.com/vim/vim/commit/b7963df98f9dbbb824713acad2f47c9989fcf8f3
This only patches the fix, not the whole thing.
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 80dfebd33e..d029a66301 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -1245,6 +1245,33 @@ end]] | ]]} end) + + it('cursor positions are correct with multiple inline virtual text', function() + insert('12345678') + meths.buf_set_extmark(0, ns, 0, 4, + { virt_text = { { ' virtual text ', 'Special' } }, virt_text_pos = 'inline' }) + meths.buf_set_extmark(0, ns, 0, 4, + { virt_text = { { ' virtual text ', 'Special' } }, virt_text_pos = 'inline' }) + feed '^' + feed '4l' + screen:expect { grid = [[ + 1234{28: virtual text virtual text }^5678 | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]} + end) end) describe('decorations: virtual lines', function() |