patch 9.1.1145: multi-line completion has wrong indentation for last line
Problem: When expanding omni completion items with newlines (e.g.
`then\n\t\nend`), the end statement gets wrong indentation.
Solution: Add OPENLINE_FORCE_INDENT flag to make open_line() use
second_line_indent directly (glepnir)
closes: #16614
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Justin M. Keyes <justinkz@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/vim.h b/src/vim.h
index 2ebc8fe..da2835c 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1175,12 +1175,13 @@
#define INSCHAR_COM_LIST 16 // format comments with list/2nd line indent
// flags for open_line()
-#define OPENLINE_DELSPACES 0x01 // delete spaces after cursor
-#define OPENLINE_DO_COM 0x02 // format comments
-#define OPENLINE_KEEPTRAIL 0x04 // keep trailing spaces
-#define OPENLINE_MARKFIX 0x08 // fix mark positions
-#define OPENLINE_COM_LIST 0x10 // format comments with list/2nd line indent
-#define OPENLINE_FORMAT 0x20 // formatting long comment
+#define OPENLINE_DELSPACES 0x01 // delete spaces after cursor
+#define OPENLINE_DO_COM 0x02 // format comments
+#define OPENLINE_KEEPTRAIL 0x04 // keep trailing spaces
+#define OPENLINE_MARKFIX 0x08 // fix mark positions
+#define OPENLINE_COM_LIST 0x10 // format comments with list/2nd line indent
+#define OPENLINE_FORMAT 0x20 // formatting long comment
+#define OPENLINE_FORCE_INDENT 0x40 // use second_line_indent without indent logic
// There are five history tables:
#define HIST_CMD 0 // colon commands