mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 06:20:53 +00:00
fix(edit): don't subtract msg_scrolled when removing double quote (#22630)
With msg_grid there is no need to subtract msg_scrolled.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
-- Insert-mode tests.
|
||||
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local Screen = require('test.functional.ui.screen')
|
||||
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
||||
local expect = helpers.expect
|
||||
local command = helpers.command
|
||||
@@ -48,6 +49,48 @@ describe('insert-mode', function()
|
||||
feed('i<C-r>"')
|
||||
expect('påskägg')
|
||||
end)
|
||||
|
||||
it('double quote is removed after hit-enter prompt #22609', function()
|
||||
local screen = Screen.new(60, 6)
|
||||
screen:set_default_attr_ids({
|
||||
[0] = {bold = true, foreground = Screen.colors.Blue},
|
||||
[1] = {foreground = Screen.colors.Blue},
|
||||
[2] = {foreground = Screen.colors.SlateBlue},
|
||||
[3] = {bold = true},
|
||||
[4] = {reverse = true, bold = true},
|
||||
[5] = {background = Screen.colors.Red, foreground = Screen.colors.Red},
|
||||
[6] = {background = Screen.colors.Red, foreground = Screen.colors.White},
|
||||
[7] = {foreground = Screen.colors.SeaGreen, bold = true},
|
||||
})
|
||||
screen:attach()
|
||||
feed('i<C-R>')
|
||||
screen:expect([[
|
||||
{1:^"} |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{3:-- INSERT --} |
|
||||
]])
|
||||
feed('={}<CR>')
|
||||
screen:expect([[
|
||||
{1:"} |
|
||||
{0:~ }|
|
||||
{4: }|
|
||||
={5:{}{2:}} |
|
||||
{6:E731: using Dictionary as a String} |
|
||||
{7:Press ENTER or type command to continue}^ |
|
||||
]])
|
||||
feed('<CR>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{3:-- INSERT --} |
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('Ctrl-O', function()
|
||||
|
||||
Reference in New Issue
Block a user