aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/lsp/incremental_sync_spec.lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2022-03-06 07:52:11 -0800
committerGitHub <noreply@github.com>2022-03-06 07:52:11 -0800
commit3800615da9eaf9e8b26d9040c882c74084d688e4 (patch)
treebb2388a2c25a7d7d02d139a4890abfb31fba74d3 /test/functional/plugin/lsp/incremental_sync_spec.lua
parent24d56116f70fff655282169ad010298349e0023b (diff)
downloadrneovim-3800615da9eaf9e8b26d9040c882c74084d688e4.tar.gz
rneovim-3800615da9eaf9e8b26d9040c882c74084d688e4.tar.bz2
rneovim-3800615da9eaf9e8b26d9040c882c74084d688e4.zip
fix(lsp): handle insertion of previous line (#17618)
Diffstat (limited to 'test/functional/plugin/lsp/incremental_sync_spec.lua')
-rw-r--r--test/functional/plugin/lsp/incremental_sync_spec.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/plugin/lsp/incremental_sync_spec.lua b/test/functional/plugin/lsp/incremental_sync_spec.lua
index da54f3c649..4985da9cd7 100644
--- a/test/functional/plugin/lsp/incremental_sync_spec.lua
+++ b/test/functional/plugin/lsp/incremental_sync_spec.lua
@@ -259,6 +259,25 @@ describe('incremental synchronization', function()
}
test_edit({""}, {"o"}, expected_text_changes, 'utf-16', '\n')
end)
+ it('insert a line above the current line', function()
+ local expected_text_changes = {
+ {
+ range = {
+ ['start'] = {
+ character = 0,
+ line = 0
+ },
+ ['end'] = {
+ character = 0,
+ line = 0
+ }
+ },
+ rangeLength = 0,
+ text = '\n'
+ }
+ }
+ test_edit({""}, {"O"}, expected_text_changes, 'utf-16', '\n')
+ end)
end)
describe('multi line edit', function()
it('deletion and insertion', function()