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:
zeertzjq
2025-03-06 08:26:31 +08:00
committed by GitHub
parent 1a35eb9b56
commit 9c4f2cde7b
3 changed files with 27 additions and 1 deletions

View File

@@ -1896,6 +1896,7 @@ func Test_pum_complete_with_special_characters()
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>
END
call writefile(lines, 'Xpreviewscript', 'D')
@@ -1954,6 +1955,14 @@ func Test_pum_complete_with_special_characters()
call TermWait(buf, 50)
call VerifyScreenDump(buf, 'Test_pum_with_special_characters_12', {})
call term_sendkeys(buf, "\<ESC>ggVGd")
call term_sendkeys(buf, ":filetype indent on\<CR>")
call term_sendkeys(buf, ":set nocompatible autoindent& shiftwidth& tabstop&\<CR>")
call term_sendkeys(buf, ":setlocal ft=lua\<CR>")
call term_sendkeys(buf, "S\<F5>")
call TermWait(buf, 50)
call VerifyScreenDump(buf, 'Test_pum_with_special_characters_13', {})
call StopVimInTerminal(buf)
endfunc