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.159 < prev    next >
Encoding:
Internet Message Format  |  2003-12-28  |  1.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.159
  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.159
  11. Problem:    When using expression folding and 'foldopen' is "undo" an undo
  12.         command doesn't always open the fold.
  13. Solution:   Save and restore the KeyTyped variable when evaluating 'foldexpr'.
  14.         (Taro Muraoka)
  15. Files:        src/fold.c
  16.  
  17.  
  18. *** ../vim-6.2.158/src/fold.c    Tue Sep  2 22:25:25 2003
  19. --- src/fold.c    Tue Dec 16 09:47:43 2003
  20. ***************
  21. *** 2842,2847 ****
  22. --- 2842,2848 ----
  23.       int        n;
  24.       int        c;
  25.       linenr_T    lnum = flp->lnum + flp->off;
  26. +     int        save_keytyped;
  27.   
  28.       win = curwin;
  29.       curwin = flp->wp;
  30. ***************
  31. *** 2854,2860 ****
  32. --- 2855,2866 ----
  33.       if (lnum <= 1)
  34.       flp->lvl = 0;
  35.   
  36. +     /* KeyTyped may be reset to 0 when calling a function which invokes
  37. +      * do_cmdline().  To make 'foldopen' work correctly restore KeyTyped. */
  38. +     save_keytyped = KeyTyped;
  39.       n = eval_foldexpr(flp->wp->w_p_fde, &c);
  40. +     KeyTyped = save_keytyped;
  41.       switch (c)
  42.       {
  43.       /* "a1", "a2", .. : add to the fold level */
  44. *** ../vim-6.2.158/src/version.c    Mon Dec 29 20:27:03 2003
  45. --- src/version.c    Mon Dec 29 20:29:37 2003
  46. ***************
  47. *** 639,640 ****
  48. --- 639,642 ----
  49.   {   /* Add new patch number below this line */
  50. + /**/
  51. +     159,
  52.   /**/
  53.  
  54. -- 
  55. I AM THANKFUL...
  56. ...for all the complaining I hear about the government
  57. because it means we have freedom of speech.
  58.  
  59.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  60. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  61. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  62.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  63.