mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
docs: api, misc
This commit is contained in:
@ -247,7 +247,7 @@ describe('prompt buffer', function()
|
||||
Close]])
|
||||
end)
|
||||
|
||||
it('can insert mutli line text', function()
|
||||
it('can insert multiline text', function()
|
||||
source_script()
|
||||
feed('line 1<s-cr>line 2<s-cr>line 3')
|
||||
screen:expect([[
|
||||
@ -275,7 +275,7 @@ describe('prompt buffer', function()
|
||||
]])
|
||||
end)
|
||||
|
||||
it('can paste multiline text', function()
|
||||
it('can put (p) multiline text', function()
|
||||
source_script()
|
||||
fn('setreg', 'a', 'line 1\nline 2\nline 3')
|
||||
feed('<esc>"ap')
|
||||
@ -302,7 +302,7 @@ describe('prompt buffer', function()
|
||||
]])
|
||||
end)
|
||||
|
||||
it('undo works for current prompt', function()
|
||||
it('can undo current prompt', function()
|
||||
source_script()
|
||||
-- text editiing alowed in current prompt
|
||||
feed('tests-initial<esc>')
|
||||
@ -507,19 +507,18 @@ describe('prompt buffer', function()
|
||||
]])
|
||||
end)
|
||||
|
||||
it(': mark follows current prompt', function()
|
||||
it("sets the ': mark", function()
|
||||
source_script()
|
||||
feed('asdf')
|
||||
eq({ 1, 1 }, api.nvim_buf_get_mark(0, ':'))
|
||||
feed('<cr>')
|
||||
eq({ 3, 1 }, api.nvim_buf_get_mark(0, ':'))
|
||||
end)
|
||||
-- Multiline prompt.
|
||||
feed('<s-cr>line1<s-cr>line2<s-cr>line3<cr>')
|
||||
eq({ 11, 1 }, api.nvim_buf_get_mark(0, ':'))
|
||||
|
||||
it(': mark only available in prompt buffer', function()
|
||||
source_script()
|
||||
feed('asdf')
|
||||
eq({ 1, 1 }, api.nvim_buf_get_mark(0, ':'))
|
||||
-- ': mark is only available in prompt buffer.
|
||||
source('set buftype=')
|
||||
eq(false, pcall(api.nvim_buf_get_mark, 0, ':'))
|
||||
eq("Invalid mark name: ':'", t.pcall_err(api.nvim_buf_get_mark, 0, ':'))
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user