fix(snippet): setting end_right_gravity (#35061)

When right_gravity is set to true for deactivating tabstop expansion we
have to set end_right_gravity to false to avoid expanding the tabstop
region on the right side. Vice versa for activating tabstop expansion
again.

(cherry picked from commit dff78f580d)
This commit is contained in:
TheBlob42
2025-07-27 21:19:01 +02:00
committed by github-actions[bot]
parent 6b820258cd
commit 2e4baa3679
2 changed files with 7 additions and 3 deletions

View File

@@ -249,7 +249,11 @@ describe('vim.snippet', function()
feed('<Tab>')
poke_eventloop()
feed(',2')
eq({ 'for i=1,10,2 do', '\t', 'end' }, buf_lines(0))
-- Make sure changes on previous tabstops does not change following ones
feed('<S-Tab>')
poke_eventloop()
feed('20')
eq({ 'for i=1,20,2 do', '\t', 'end' }, buf_lines(0))
end)
it('updates snippet state when built-in completion menu is visible', function()