aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/indent.c6
-rw-r--r--src/nvim/version.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index 9258ee93b6..7090e007bf 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -451,6 +451,7 @@ int get_breakindent_win(win_T *wp, char_u *line) {
static int prev_indent = 0; /* cached indent value */
static int prev_ts = 0L; /* cached tabstop value */
static char_u *prev_line = NULL; /* cached pointer to line */
+ static int prev_tick = 0; // changedtick of cached value
int bri = 0;
/* window width minus window margin space, i.e. what rests for text */
const int eff_wwidth = wp->w_width
@@ -459,10 +460,11 @@ int get_breakindent_win(win_T *wp, char_u *line) {
? number_width(wp) + 1 : 0);
/* used cached indent, unless pointer or 'tabstop' changed */
- if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts)
- {
+ if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts
+ || prev_tick != wp->w_buffer->b_changedtick) {
prev_line = line;
prev_ts = wp->w_buffer->b_p_ts;
+ prev_tick = wp->w_buffer->b_changedtick;
prev_indent = get_indent_str(line,
(int)wp->w_buffer->b_p_ts, wp->w_p_list);
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 092d21f580..965becdd3d 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -250,7 +250,7 @@ static int included_patches[] = {
//348,
//347,
346,
- //345,
+ 345,
344,
343,
//342 NA