mirror of
https://github.com/neovim/neovim.git
synced 2026-04-30 19:24:09 +00:00
Merge #4591
This commit is contained in:
@@ -1359,6 +1359,9 @@ ins_redraw (
|
||||
update_screen(0);
|
||||
}
|
||||
if (has_event(EVENT_CURSORMOVEDI)) {
|
||||
// Make sure curswant is correct, an autocommand may call
|
||||
// getcurpos()
|
||||
update_curswant();
|
||||
apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, false, curbuf);
|
||||
}
|
||||
if (curwin->w_p_cole > 0) {
|
||||
|
||||
@@ -382,7 +382,7 @@ static int included_patches[] = {
|
||||
// 1299 NA
|
||||
// 1298 NA
|
||||
// 1297 NA
|
||||
// 1296,
|
||||
1296,
|
||||
// 1295 NA
|
||||
// 1294 NA
|
||||
// 1293 NA
|
||||
|
||||
36
test/functional/plugin/matchparen_spec.lua
Normal file
36
test/functional/plugin/matchparen_spec.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
local helpers = require('test.functional.helpers')
|
||||
local Screen = require('test.functional.ui.screen')
|
||||
local clear, feed, execute = helpers.clear, helpers.feed, helpers.execute
|
||||
|
||||
describe('matchparen', function()
|
||||
local screen
|
||||
|
||||
before_each(function()
|
||||
clear()
|
||||
screen = Screen.new(20,5)
|
||||
screen:attach()
|
||||
screen:set_default_attr_ignore( {{bold=true, foreground=Screen.colors.Blue}} )
|
||||
end)
|
||||
|
||||
it('uses correct column after i_<Up>. Vim patch 7.4.1296', function()
|
||||
execute('set noai nosi nocin')
|
||||
execute('runtime plugin/matchparen.vim')
|
||||
feed('ivoid f_test()<cr>')
|
||||
feed('{<cr>')
|
||||
feed('}')
|
||||
|
||||
-- critical part: up + cr should result in an empty line inbetween the
|
||||
-- brackets... if the bug is there, the empty line will be before the '{'
|
||||
feed('<up>')
|
||||
feed('<cr>')
|
||||
|
||||
screen:expect([[
|
||||
void f_test() |
|
||||
{ |
|
||||
^ |
|
||||
} |
|
||||
{1:-- INSERT --} |
|
||||
]], {[1] = {bold = true}})
|
||||
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user