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.197 < prev    next >
Encoding:
Internet Message Format  |  2004-01-24  |  4.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.197
  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.197
  11. Problem:    It is not possible to force a redraw of status lines. (Gary
  12.         Johnson)
  13. Solution:   Add the ":redrawstatus" command.
  14. Files:        runtime/doc/various.txt, src/ex_cmds.h, src/ex_docmd.c,
  15.         src/screen.c
  16.  
  17.  
  18. *** ../vim-6.2.196/runtime/doc/various.txt    Sun Jun  1 12:20:37 2003
  19. --- runtime/doc/various.txt    Wed Jan 21 13:57:43 2004
  20. ***************
  21. *** 1,4 ****
  22. ! *various.txt*   For Vim version 6.2.  Last change: 2003 May 11
  23.   
  24.   
  25.             VIM REFERENCE MANUAL    by Bram Moolenaar
  26. --- 1,4 ----
  27. ! *various.txt*   For Vim version 6.2.  Last change: 2004 Jan 21
  28.   
  29.   
  30.             VIM REFERENCE MANUAL    by Bram Moolenaar
  31. ***************
  32. *** 24,35 ****
  33.               or function.  Also when halfway a mapping and
  34.               'lazyredraw' is set.
  35.   
  36.                               *N<Del>*
  37.   <Del>            When entering a number: Remove the last digit.
  38.               Note: if you like to use <BS> for this, add this
  39. !             mapping to your .vimrc:
  40.                   :map CTRL-V <BS>   CTRL-V <Del>
  41. !             See |:fixdel| if your <Del> key does not do what you
  42.               want.
  43.   
  44.   :as[cii]    or                    *ga* *:as* *:ascii*
  45. --- 24,42 ----
  46.               or function.  Also when halfway a mapping and
  47.               'lazyredraw' is set.
  48.   
  49. +                         *:redraws* *:redrawstatus*
  50. + :redraws[tatus][!]    Redraw the status line of the current window.  When !
  51. +             is included all status lines are redrawn.
  52. +             Useful to update the status line(s) when 'statusline'
  53. +             includes an item that doesn't cause automatic
  54. +             updating.
  55.                               *N<Del>*
  56.   <Del>            When entering a number: Remove the last digit.
  57.               Note: if you like to use <BS> for this, add this
  58. !             mapping to your .vimrc: >
  59.                   :map CTRL-V <BS>   CTRL-V <Del>
  60. ! <            See |:fixdel| if your <Del> key does not do what you
  61.               want.
  62.   
  63.   :as[cii]    or                    *ga* *:as* *:ascii*
  64. *** ../vim-6.2.196/src/ex_cmds.h    Sun Jan 18 20:46:13 2004
  65. --- src/ex_cmds.h    Mon Jan 19 12:13:22 2004
  66. ***************
  67. *** 618,623 ****
  68. --- 618,625 ----
  69.               BANG|FILES|TRLBAR|CMDWIN),
  70.   EX(CMD_redraw,        "redraw",    ex_redraw,
  71.               BANG|TRLBAR|CMDWIN),
  72. + EX(CMD_redrawstatus,    "redrawstatus",    ex_redrawstatus,
  73. +             BANG|TRLBAR|CMDWIN),
  74.   EX(CMD_registers,    "registers",    ex_display,
  75.               EXTRA|NOTRLCOM|TRLBAR|CMDWIN),
  76.   EX(CMD_resize,        "resize",    ex_resize,
  77. *** ../vim-6.2.196/src/ex_docmd.c    Sun Jan 18 21:12:26 2004
  78. --- src/ex_docmd.c    Thu Jan 22 17:22:52 2004
  79. ***************
  80. *** 269,274 ****
  81. --- 269,275 ----
  82.   static void    ex_redo __ARGS((exarg_T *eap));
  83.   static void    ex_redir __ARGS((exarg_T *eap));
  84.   static void    ex_redraw __ARGS((exarg_T *eap));
  85. + static void    ex_redrawstatus __ARGS((exarg_T *eap));
  86.   static void    close_redir __ARGS((void));
  87.   static void    ex_mkrc __ARGS((exarg_T *eap));
  88.   static void    ex_mark __ARGS((exarg_T *eap));
  89. ***************
  90. *** 7178,7183 ****
  91. --- 7179,7213 ----
  92.       RedrawingDisabled = r;
  93.       p_lz = p;
  94.       out_flush();
  95. + }
  96. + /*
  97. +  * ":redrawstatus": force redraw of status line(s)
  98. +  */
  99. + /*ARGSUSED*/
  100. +     static void
  101. + ex_redrawstatus(eap)
  102. +     exarg_T    *eap;
  103. + {
  104. + #if defined(FEAT_WINDOWS)
  105. +     int        r = RedrawingDisabled;
  106. +     int        p = p_lz;
  107. +     RedrawingDisabled = 0;
  108. +     p_lz = FALSE;
  109. +     if (eap->forceit)
  110. +     status_redraw_all();
  111. +     else
  112. +     status_redraw_curbuf();
  113. +     update_screen(
  114. + # ifdef FEAT_VISUAL
  115. +         VIsual_active ? INVERTED :
  116. + # endif
  117. +         0);
  118. +     RedrawingDisabled = r;
  119. +     p_lz = p;
  120. +     out_flush();
  121. + #endif
  122.   }
  123.   
  124.       static void
  125. *** ../vim-6.2.196/src/screen.c    Mon Aug  4 20:55:46 2003
  126. --- src/screen.c    Thu Jan 22 17:22:13 2004
  127. ***************
  128. *** 4584,4590 ****
  129.       }
  130.   }
  131.   
  132. - # if defined(FEAT_KEYMAP) || defined(PROTO)
  133.   /*
  134.    * mark all status lines of the current buffer for redraw
  135.    */
  136. --- 4584,4589 ----
  137. ***************
  138. *** 4600,4606 ****
  139.           redraw_later(VALID);
  140.       }
  141.   }
  142. - # endif
  143.   
  144.   /*
  145.    * Redraw all status lines that need to be redrawn.
  146. --- 4599,4604 ----
  147. *** ../vim-6.2.196/src/version.c    Sun Jan 25 19:28:46 2004
  148. --- src/version.c    Sun Jan 25 19:30:35 2004
  149. ***************
  150. *** 639,640 ****
  151. --- 639,642 ----
  152.   {   /* Add new patch number below this line */
  153. + /**/
  154. +     197,
  155.   /**/
  156.  
  157. -- 
  158. No children may attend school with their breath smelling of "wild onions."
  159.         [real standing law in West Virginia, United States of America]
  160.  
  161.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  162. ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  163. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  164.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  165.