diff --git a/7.4.345 b/7.4.345 new file mode 100644 index 0000000..7cac5f6 --- /dev/null +++ b/7.4.345 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.345 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.345 (after 7.4.338) +Problem: Indent is not updated when deleting indent. +Solution: Remember changedtick. +Files: src/misc1.c + + +*** ../vim-7.4.344/src/misc1.c 2014-06-25 14:39:35.106348584 +0200 +--- src/misc1.c 2014-06-25 22:51:32.955465286 +0200 +*************** +*** 497,502 **** +--- 497,503 ---- + 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,514 **** + ? 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) + { + prev_line = line; + prev_ts = wp->w_buffer->b_p_ts; + prev_indent = get_indent_str(line, + (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift; + } +--- 506,517 ---- + ? 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 +! || 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; + } +*** ../vim-7.4.344/src/version.c 2014-06-25 18:15:18.446838249 +0200 +--- src/version.c 2014-06-25 22:52:55.971468427 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 345, + /**/ + +-- +ARTHUR: Well, I can't just call you `Man'. +DENNIS: Well, you could say `Dennis'. +ARTHUR: Well, I didn't know you were called `Dennis.' +DENNIS: Well, you didn't bother to find out, did you? + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org ///