mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
vim-patch:9.1.1176: wrong indent when expanding multiple lines (#32746)
Problem: wrong indentation of lastline when expanding multiple lines
Solution: Check OPENLINE_FORCE_INDENT flag in open_line() (glepnir)
closes: vim/vim#16786
34a7d82aae
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -7310,6 +7310,7 @@ describe('builtin popupmenu', function()
|
||||
return [#{word: "func ()\n\t\nend", abbr: "function ()",}, #{word: "foobar"}, #{word: "你好\n\t\n我好"}]
|
||||
endfunc
|
||||
set omnifunc=Omni_test
|
||||
inoremap <F5> <Cmd>call complete(col('.'), [ "my\n\tmulti\nline", "my\n\t\tmulti\nline" ])<CR>
|
||||
]])
|
||||
|
||||
feed('S<C-X><C-O>')
|
||||
@@ -7452,6 +7453,21 @@ describe('builtin popupmenu', function()
|
||||
{1:~ }|*14
|
||||
{2:-- INSERT --} |
|
||||
]])
|
||||
|
||||
feed('<Esc>ggVGd')
|
||||
command('filetype indent on')
|
||||
command('setlocal noautoindent shiftwidth& tabstop&')
|
||||
command('setlocal ft=lua')
|
||||
feed('S<F5>')
|
||||
screen:expect([[
|
||||
{8:my} |
|
||||
{8: multi} |
|
||||
{8:line}^ |
|
||||
{s:my^@ multi^@line }{1: }|
|
||||
{n:my^@ multi^@line }{1: }|
|
||||
{1:~ }|*14
|
||||
{2:-- INSERT --} |
|
||||
]])
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user