|
|
073263 |
To: vim_dev@googlegroups.com
|
|
|
073263 |
Subject: Patch 7.4.345
|
|
|
073263 |
Fcc: outbox
|
|
|
073263 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
073263 |
Mime-Version: 1.0
|
|
|
073263 |
Content-Type: text/plain; charset=UTF-8
|
|
|
073263 |
Content-Transfer-Encoding: 8bit
|
|
|
073263 |
------------
|
|
|
073263 |
|
|
|
073263 |
Patch 7.4.345 (after 7.4.338)
|
|
|
073263 |
Problem: Indent is not updated when deleting indent.
|
|
|
073263 |
Solution: Remember changedtick.
|
|
|
073263 |
Files: src/misc1.c
|
|
|
073263 |
|
|
|
073263 |
|
|
|
073263 |
*** ../vim-7.4.344/src/misc1.c 2014-06-25 14:39:35.106348584 +0200
|
|
|
073263 |
--- src/misc1.c 2014-06-25 22:51:32.955465286 +0200
|
|
|
073263 |
***************
|
|
|
073263 |
*** 497,502 ****
|
|
|
073263 |
--- 497,503 ----
|
|
|
073263 |
static int prev_indent = 0; /* cached indent value */
|
|
|
073263 |
static long prev_ts = 0L; /* cached tabstop value */
|
|
|
073263 |
static char_u *prev_line = NULL; /* cached pointer to line */
|
|
|
073263 |
+ static int prev_tick = 0; /* changedtick of cached value */
|
|
|
073263 |
int bri = 0;
|
|
|
073263 |
/* window width minus window margin space, i.e. what rests for text */
|
|
|
073263 |
const int eff_wwidth = W_WIDTH(wp)
|
|
|
073263 |
***************
|
|
|
073263 |
*** 505,514 ****
|
|
|
073263 |
? number_width(wp) + 1 : 0);
|
|
|
073263 |
|
|
|
073263 |
/* used cached indent, unless pointer or 'tabstop' changed */
|
|
|
073263 |
! if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts)
|
|
|
073263 |
{
|
|
|
073263 |
prev_line = line;
|
|
|
073263 |
prev_ts = wp->w_buffer->b_p_ts;
|
|
|
073263 |
prev_indent = get_indent_str(line,
|
|
|
073263 |
(int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift;
|
|
|
073263 |
}
|
|
|
073263 |
--- 506,517 ----
|
|
|
073263 |
? number_width(wp) + 1 : 0);
|
|
|
073263 |
|
|
|
073263 |
/* used cached indent, unless pointer or 'tabstop' changed */
|
|
|
073263 |
! if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts
|
|
|
073263 |
! || prev_tick != wp->w_buffer->b_changedtick)
|
|
|
073263 |
{
|
|
|
073263 |
prev_line = line;
|
|
|
073263 |
prev_ts = wp->w_buffer->b_p_ts;
|
|
|
073263 |
+ prev_tick = wp->w_buffer->b_changedtick;
|
|
|
073263 |
prev_indent = get_indent_str(line,
|
|
|
073263 |
(int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift;
|
|
|
073263 |
}
|
|
|
073263 |
*** ../vim-7.4.344/src/version.c 2014-06-25 18:15:18.446838249 +0200
|
|
|
073263 |
--- src/version.c 2014-06-25 22:52:55.971468427 +0200
|
|
|
073263 |
***************
|
|
|
073263 |
*** 736,737 ****
|
|
|
073263 |
--- 736,739 ----
|
|
|
073263 |
{ /* Add new patch number below this line */
|
|
|
073263 |
+ /**/
|
|
|
073263 |
+ 345,
|
|
|
073263 |
/**/
|
|
|
073263 |
|
|
|
073263 |
--
|
|
|
073263 |
ARTHUR: Well, I can't just call you `Man'.
|
|
|
073263 |
DENNIS: Well, you could say `Dennis'.
|
|
|
073263 |
ARTHUR: Well, I didn't know you were called `Dennis.'
|
|
|
073263 |
DENNIS: Well, you didn't bother to find out, did you?
|
|
|
073263 |
The Quest for the Holy Grail (Monty Python)
|
|
|
073263 |
|
|
|
073263 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
073263 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
073263 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
073263 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|