vim-patch:7.4.803

Problem:    C indent does not support C11 raw strings. (Mark Lodato)
Solution:   Do not change indent inside the raw string.

f7bb86dc59
This commit is contained in:
Johan Klokkhammer Helsing
2015-11-03 22:04:15 +01:00
parent b079622716
commit 3b472e55b3
6 changed files with 500 additions and 280 deletions

View File

@@ -6584,9 +6584,14 @@ static int cindent_on(void) {
*/
void fixthisline(IndentGetter get_the_indent)
{
change_indent(INDENT_SET, get_the_indent(), FALSE, 0, TRUE);
if (linewhite(curwin->w_cursor.lnum))
did_ai = TRUE; /* delete the indent if the line stays empty */
int amount = get_the_indent();
if (amount >= 0) {
change_indent(INDENT_SET, amount, false, 0, true);
if (linewhite(curwin->w_cursor.lnum)) {
did_ai = TRUE; // delete the indent if the line stays empty
}
}
}
void fix_indent(void) {