aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/extmark_spec.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2024-12-06 11:13:58 +0100
committerLuuk van Baal <luukvbaal@gmail.com>2024-12-06 11:57:07 +0100
commitc4f76299f0398f8a9b42bb7c1a5fad3205680298 (patch)
treeb8c0698a3c6f30f5e4179d5b06282e6b581e303d /test/functional/api/extmark_spec.lua
parent812d02970206d5a65819e076bcddedd92e083a19 (diff)
downloadrneovim-c4f76299f0398f8a9b42bb7c1a5fad3205680298.tar.gz
rneovim-c4f76299f0398f8a9b42bb7c1a5fad3205680298.tar.bz2
rneovim-c4f76299f0398f8a9b42bb7c1a5fad3205680298.zip
fix(marks): skip right_gravity marks when deleting text
Problem: Marks that are properly restored by the splice associated with an undo edit, are unnecessarily pushed to the undo header. This results in incorrect mark tracking in the "copy_only" save/restore completion path. Solution: Avoid pushing left gravity marks at the beginning of the range, and right gravity marks at the end of the range to the undo header.
Diffstat (limited to 'test/functional/api/extmark_spec.lua')
-rw-r--r--test/functional/api/extmark_spec.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua
index 43be0c0e43..49c55288e8 100644
--- a/test/functional/api/extmark_spec.lua
+++ b/test/functional/api/extmark_spec.lua
@@ -249,7 +249,7 @@ describe('API/extmarks', function()
set_extmark(ns, 2, 1, 0, { right_gravity = false })
eq({ { 1, 0, 0 }, { 2, 1, 0 } }, get_extmarks(ns, { 0, 0 }, { -1, -1 }))
feed('u')
- eq({ { 1, 0, 0 }, { 2, 1, 0 } }, get_extmarks(ns, { 0, 0 }, { -1, -1 }))
+ eq({ { 1, 0, 0 }, { 2, 0, 0 } }, get_extmarks(ns, { 0, 0 }, { -1, -1 }))
api.nvim_buf_clear_namespace(0, ns, 0, -1)
end)