diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-06-25 22:55:38 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-06-25 22:55:38 +0200 |
commit | a40aa760a1f49defccf2f8090d9f5ddf463e3303 (patch) | |
tree | fb0f709956bd1dbdb1da6831ea9c5b62869bb25a | |
parent | 946e27ab65d6f5d25c449a1bf6aedd808149601f (diff) | |
download | vim-git-7.4.345.tar.gz |
updated for version 7.4.345v7.4.345
Problem: Indent is not updated when deleting indent.
Solution: Remember changedtick.
-rw-r--r-- | src/misc1.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/misc1.c b/src/misc1.c index 1c2f8f274..ebcb0b233 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -497,6 +497,7 @@ get_breakindent_win(wp, line) static int prev_indent = 0; /* cached indent value */ static long 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 = W_WIDTH(wp) @@ -505,10 +506,12 @@ get_breakindent_win(wp, 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) + wp->w_p_brishift; } diff --git a/src/version.c b/src/version.c index adb9ef471..a9d39dfe1 100644 --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 345, +/**/ 344, /**/ 343, |