patch 9.1.1176: wrong indent when expanding multiple lines
Problem: wrong indentation of lastline when expanding multiple lines
Solution: Check OPENLINE_FORCE_INDENT flag in open_line() (glepnir)
closes: #16786
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 82d2ef0..aa4e3e4 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -1905,6 +1905,7 @@
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')
@@ -1963,6 +1964,14 @@
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