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 / 6.2.363 < prev    next >
Encoding:
Internet Message Format  |  2004-03-15  |  2.3 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.363
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.363
  11. Problem:    In an empty file with 'showmode' off, "i" doesn't change the ruler
  12.         from "0-1" to "1".  Typing "x<BS>" does show "1", but then <Esc>
  13.         doesn't make it "0-1" again.  Same problem for ruler in
  14.         statusline.  (Andrew Pimlott)
  15. Solution:   Remember the "empty line" flag with Insert mode and'ed to it.
  16. Files:        src/screen.c
  17.  
  18.  
  19. *** ../vim-6.2.362/src/screen.c    Mon Mar 15 12:26:21 2004
  20. --- src/screen.c    Tue Mar 16 15:35:17 2004
  21. ***************
  22. *** 8207,8215 ****
  23.   #endif
  24.   
  25.       /*
  26. !      * Check if the line is empty (will show "0-1").
  27.        */
  28. !     if (*ml_get_buf(wp->w_buffer, wp->w_cursor.lnum, FALSE) == NUL)
  29.       empty_line = TRUE;
  30.   
  31.       /*
  32. --- 8207,8216 ----
  33.   #endif
  34.   
  35.       /*
  36. !      * Check if not in Insert mode and the line is empty (will show "0-1").
  37.        */
  38. !     if (!(State & INSERT)
  39. !         && *ml_get_buf(wp->w_buffer, wp->w_cursor.lnum, FALSE) == NUL)
  40.       empty_line = TRUE;
  41.   
  42.       /*
  43. ***************
  44. *** 8271,8280 ****
  45.               ? 0L
  46.               : (long)(wp->w_cursor.lnum));
  47.       col_print(buffer + STRLEN(buffer),
  48. !         !(State & INSERT) && empty_line
  49. !             ? 0
  50. !             : (int)wp->w_cursor.col + 1,
  51. !         (int)virtcol + 1);
  52.   
  53.       /*
  54.        * Add a "50%" if there is room for it.
  55. --- 8272,8279 ----
  56.               ? 0L
  57.               : (long)(wp->w_cursor.lnum));
  58.       col_print(buffer + STRLEN(buffer),
  59. !             empty_line ? 0 : (int)wp->w_cursor.col + 1,
  60. !             (int)virtcol + 1);
  61.   
  62.       /*
  63.        * Add a "50%" if there is room for it.
  64. *** ../vim-6.2.362/src/version.c    Tue Mar 16 14:13:41 2004
  65. --- src/version.c    Tue Mar 16 15:34:00 2004
  66. ***************
  67. *** 639,640 ****
  68. --- 639,642 ----
  69.   {   /* Add new patch number below this line */
  70. + /**/
  71. +     363,
  72.   /**/
  73.  
  74. -- 
  75. hundred-and-one symptoms of being an internet addict:
  76. 35. Your husband tells you he's had the beard for 2 months.
  77.  
  78.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  79. ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  80. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  81.  \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
  82.