aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/buffer_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-02-08 19:08:43 +0100
committerGitHub <noreply@github.com>2021-02-08 19:08:43 +0100
commitb2b47e46187c59c9fcbfe31bdb2071af4c09a1a5 (patch)
tree2f611ae5a4e3b42779eb680b5bc8b43bb2cd1e3d /test/functional/api/buffer_spec.lua
parent00423730b5eddc628a4b996b9e226fe23d7ce1f2 (diff)
parent05605bfc05054fa7bbeb5ed2412e5ef58721cfa4 (diff)
downloadrneovim-b2b47e46187c59c9fcbfe31bdb2071af4c09a1a5.tar.gz
rneovim-b2b47e46187c59c9fcbfe31bdb2071af4c09a1a5.tar.bz2
rneovim-b2b47e46187c59c9fcbfe31bdb2071af4c09a1a5.zip
Merge pull request #13899 from chentau/set_text_fix
correctly mark changed regions for set_text
Diffstat (limited to 'test/functional/api/buffer_spec.lua')
-rw-r--r--test/functional/api/buffer_spec.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/api/buffer_spec.lua b/test/functional/api/buffer_spec.lua
index fb8ed6a9d7..81fad206da 100644
--- a/test/functional/api/buffer_spec.lua
+++ b/test/functional/api/buffer_spec.lua
@@ -513,6 +513,28 @@ describe('api/buf', function()
eq({0, 8}, curbufmeths.get_extmark_by_id(ns, id2, {}))
eq({0, 8}, curbufmeths.get_extmark_by_id(ns, id3, {}))
end)
+
+ it("correctly marks changed region for redraw #13890", function()
+ local screen = Screen.new(20, 5)
+ screen:attach()
+
+ insert([[
+ AAA
+ BBB
+ ]])
+
+ curbufmeths.set_text(0, 0, 1, 3, {'XXX', 'YYY'})
+
+ screen:expect([[
+ XXX |
+ YYY |
+ ^ |
+ ~ |
+ |
+
+ ]])
+
+ end)
end)
describe('nvim_buf_get_offset', function()