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.1.194 < prev    next >
Encoding:
Internet Message Format  |  2002-09-22  |  3.1 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.194
  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.1.194
  11. Problem:    When "t_ti" is set but it doesn't cause swapping terminal pages,
  12.         "ZZ" may cause the shell prompt to appear on top of the file-write
  13.         message.
  14. Solution:   Scroll the text up in the Vim page before swapping to the terminal
  15.         page. (Michael Schroeder)
  16. Files:        src/os_unix.c
  17.  
  18.  
  19. *** ../vim61.193/src/os_unix.c    Sat Sep 14 17:00:01 2002
  20. --- src/os_unix.c    Thu Sep 19 21:22:50 2002
  21. ***************
  22. *** 2425,2430 ****
  23. --- 2425,2450 ----
  24.   #endif
  25.   }
  26.   
  27. + static void exit_scroll __ARGS((void));
  28. + /*
  29. +  * Output a newline when exiting.
  30. +  * Make sure the newline goes to the same stream as the text.
  31. +  */
  32. +     static void
  33. + exit_scroll()
  34. + {
  35. +     if (msg_use_printf())
  36. +     {
  37. +     if (info_message)
  38. +         mch_msg("\r\n");
  39. +     else
  40. +         mch_errmsg("\r\n");
  41. +     }
  42. +     else
  43. +     out_char('\n');
  44. + }
  45.       void
  46.   mch_exit(r)
  47.       int r;
  48. ***************
  49. *** 2443,2449 ****
  50.   #ifdef FEAT_TITLE
  51.       mch_restore_title(3);    /* restore xterm title and icon name */
  52.   #endif
  53. !     /* Stop termcap first: May need to check for T_CRV response, which
  54.        * requires RAW mode. */
  55.       stoptermcap();
  56.   
  57. --- 2463,2478 ----
  58.   #ifdef FEAT_TITLE
  59.       mch_restore_title(3);    /* restore xterm title and icon name */
  60.   #endif
  61. !     /*
  62. !      * When t_ti is not empty but it doesn't cause swapping terminal
  63. !      * pages, need to output a newline when msg_didout is set.  But when
  64. !      * t_ti does swap pages it should not go to the shell page.  Do this
  65. !      * before stoptermcap().
  66. !      */
  67. !     if (swapping_screen() && !newline_on_exit && msg_didout)
  68. !         exit_scroll();
  69. !     /* Stop termcap: May need to check for T_CRV response, which
  70.        * requires RAW mode. */
  71.       stoptermcap();
  72.   
  73. ***************
  74. *** 2454,2471 ****
  75.       if (!swapping_screen() || newline_on_exit)
  76.       {
  77.           if (newline_on_exit || msg_didout)
  78. !         {
  79. !         /* Make sure the newline goes to the same stream as the text */
  80. !         if (msg_use_printf())
  81. !         {
  82. !             if (info_message)
  83. !             mch_msg("\r\n");
  84. !             else
  85. !             mch_errmsg("\r\n");
  86. !         }
  87. !         else
  88. !             out_char('\n');
  89. !         }
  90.           else
  91.           {
  92.           restore_cterm_colors();    /* get original colors back */
  93. --- 2483,2489 ----
  94.       if (!swapping_screen() || newline_on_exit)
  95.       {
  96.           if (newline_on_exit || msg_didout)
  97. !         exit_scroll();
  98.           else
  99.           {
  100.           restore_cterm_colors();    /* get original colors back */
  101. *** ../vim61.193/src/version.c    Mon Sep 23 21:15:51 2002
  102. --- src/version.c    Mon Sep 23 21:18:23 2002
  103. ***************
  104. *** 608,609 ****
  105. --- 608,611 ----
  106.   {   /* Add new patch number below this line */
  107. + /**/
  108. +     194,
  109.   /**/
  110.  
  111. -- 
  112. Time is an illusion.  Lunchtime doubly so.
  113.         -- Ford Prefect, in Douglas Adams'
  114.            "The Hitchhiker's Guide to the Galaxy"
  115.  
  116.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  117. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  118. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  119.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  120.