summaryrefslogtreecommitdiffstats
path: root/src/indent.c
diff options
context:
space:
mode:
authorMaxim Kim <habamax@gmail.com>2022-09-02 14:08:53 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-02 14:08:53 +0100
commit119167265ebc7eced210a7f8ed2f4b90378f98f1 (patch)
treebbdedb6335ff49ab537ebc856d62daf7d0498182 /src/indent.c
parentcf2bb633978a3d2d5bba06611c95e15170662c15 (diff)
patch 9.0.0358: 'breakindent' does not indent non-listsv9.0.0358
Problem: 'breakindent' does not indent non-lists with "breakindentopt=list:-1". Solution: Adjust indent computation. (Maxim Kim, closes #11038)
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/indent.c b/src/indent.c
index d7a2e550ad..134336c12d 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -998,7 +998,7 @@ get_breakindent_win(
if (wp->w_briopt_list > 0)
prev_list = wp->w_briopt_list;
else
- prev_list = (*regmatch.endp - *regmatch.startp);
+ prev_indent = (*regmatch.endp - *regmatch.startp);
}
vim_regfree(regmatch.regprog);
}
@@ -1017,13 +1017,8 @@ get_breakindent_win(
bri += win_col_off2(wp);
// add additional indent for numbered lists
- if (wp->w_briopt_list != 0)
- {
- if (wp->w_briopt_list > 0)
- bri += prev_list;
- else
- bri = prev_list;
- }
+ if (wp->w_briopt_list > 0)
+ bri += prev_list;
// indent minus the length of the showbreak string
if (wp->w_briopt_sbr)