mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
fix(snippet): use <cmd>call cursor() for visual range
Problem: Change applied ind3e495ce
uses a byte-offset where a virtual column is expected. Solution: Set the cursor directly through a <Cmd> mapping, while making sure the commands are ordered correctly by adding them to the type-ahead buffer. (cherry picked from commit019b2050e1
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
155529b91a
commit
c1d3777db2
@@ -307,4 +307,10 @@ describe('vim.snippet', function()
|
||||
]]
|
||||
)
|
||||
end)
|
||||
|
||||
it('correct visual selection with multi-byte text', function()
|
||||
test_expand_success({ 'function(${1:var})' }, { '口口function(var)' }, nil, '口口')
|
||||
feed('foo')
|
||||
eq({ '口口function(foo)' }, buf_lines(0))
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user