home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.345 < prev    next >
Encoding:
Internet Message Format  |  2014-06-24  |  2.6 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.345
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.345 (after 7.4.338)
  11. Problem:    Indent is not updated when deleting indent.
  12. Solution:   Remember changedtick.
  13. Files:        src/misc1.c
  14.  
  15.  
  16. *** ../vim-7.4.344/src/misc1.c    2014-06-25 14:39:35.106348584 +0200
  17. --- src/misc1.c    2014-06-25 22:51:32.955465286 +0200
  18. ***************
  19. *** 497,502 ****
  20. --- 497,503 ----
  21.       static int        prev_indent = 0;  /* cached indent value */
  22.       static long        prev_ts     = 0L; /* cached tabstop value */
  23.       static char_u   *prev_line = NULL; /* cached pointer to line */
  24. +     static int        prev_tick = 0;   /* changedtick of cached value */
  25.       int            bri = 0;
  26.       /* window width minus window margin space, i.e. what rests for text */
  27.       const int        eff_wwidth = W_WIDTH(wp)
  28. ***************
  29. *** 505,514 ****
  30.                           ? number_width(wp) + 1 : 0);
  31.   
  32.       /* used cached indent, unless pointer or 'tabstop' changed */
  33. !     if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts)
  34.       {
  35.       prev_line = line;
  36.       prev_ts = wp->w_buffer->b_p_ts;
  37.       prev_indent = get_indent_str(line,
  38.             (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift;
  39.       }
  40. --- 506,517 ----
  41.                           ? number_width(wp) + 1 : 0);
  42.   
  43.       /* used cached indent, unless pointer or 'tabstop' changed */
  44. !     if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts
  45. !                   || prev_tick != wp->w_buffer->b_changedtick)
  46.       {
  47.       prev_line = line;
  48.       prev_ts = wp->w_buffer->b_p_ts;
  49. +     prev_tick = wp->w_buffer->b_changedtick;
  50.       prev_indent = get_indent_str(line,
  51.             (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift;
  52.       }
  53. *** ../vim-7.4.344/src/version.c    2014-06-25 18:15:18.446838249 +0200
  54. --- src/version.c    2014-06-25 22:52:55.971468427 +0200
  55. ***************
  56. *** 736,737 ****
  57. --- 736,739 ----
  58.   {   /* Add new patch number below this line */
  59. + /**/
  60. +     345,
  61.   /**/
  62.  
  63. -- 
  64. ARTHUR:  Well, I can't just call you `Man'.
  65. DENNIS:  Well, you could say `Dennis'.
  66. ARTHUR:  Well, I didn't know you were called `Dennis.'
  67. DENNIS:  Well, you didn't bother to find out, did you?
  68.                                   The Quest for the Holy Grail (Monty Python)
  69.  
  70.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  71. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  72. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  73.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  74.