1
0
forked from aniani/vim

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>
This commit is contained in:
glepnir
2025-03-05 21:18:20 +01:00
committed by Christian Brabandt
parent 2e18facede
commit 34a7d82aae
4 changed files with 25 additions and 1 deletions

View File

@@ -1672,7 +1672,8 @@ open_line(
)
&& in_cinkeys(dir == FORWARD
? KEY_OPEN_FORW
: KEY_OPEN_BACK, ' ', linewhite(curwin->w_cursor.lnum));
: KEY_OPEN_BACK, ' ', linewhite(curwin->w_cursor.lnum))
&& !(flags & OPENLINE_FORCE_INDENT);
// Find out if the current line starts with a comment leader.
// This may then be inserted in front of the new line.