aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-21 17:42:17 +0800
committerGitHub <noreply@github.com>2022-07-21 17:42:17 +0800
commitc15e9d3746ee0aa6a9d80596bffc19e9ac9612bc (patch)
tree63151061bb72c56bed896bb93224687524fec314 /test
parent6a7d00469bd64e8fe63468b5c1643087432709e9 (diff)
downloadrneovim-c15e9d3746ee0aa6a9d80596bffc19e9ac9612bc.tar.gz
rneovim-c15e9d3746ee0aa6a9d80596bffc19e9ac9612bc.tar.bz2
rneovim-c15e9d3746ee0aa6a9d80596bffc19e9ac9612bc.zip
fix(mark): give correct error message when mark is in another buffer (#19454)
Diffstat (limited to 'test')
-rw-r--r--test/functional/editor/mark_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/editor/mark_spec.lua b/test/functional/editor/mark_spec.lua
index 1eb76aa628..2440867c6e 100644
--- a/test/functional/editor/mark_spec.lua
+++ b/test/functional/editor/mark_spec.lua
@@ -157,6 +157,13 @@ describe('named marks', function()
os.remove(file1)
end)
+ it("errors when using a mark in another buffer in command range", function()
+ feed('ifoo<Esc>mA')
+ command('enew')
+ feed('ibar<Esc>')
+ eq('Vim(print):E20: Mark not set', pcall_err(command, [['Aprint]]))
+ end)
+
it("leave a context mark when moving with '", function()
command("edit " .. file1)
feed("llmamA")