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.0.073 < prev    next >
Encoding:
Internet Message Format  |  2001-11-03  |  3.4 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.073 (extra)
  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.0.073 (extra)
  11. Problem:    DJGPP: When using CTRL-Z to start a shell, the prompt is halfway
  12.         the text. (Volker Kiefel)
  13. Solution:   Position the system cursor before starting the shell.
  14. Files:        src/os_msdos.c
  15.  
  16.  
  17. *** ../vim60.72/src/os_msdos.c    Sun Sep 16 17:17:36 2001
  18. --- src/os_msdos.c    Sun Nov  4 19:28:43 2001
  19. ***************
  20. *** 115,126 ****
  21. --- 115,148 ----
  22.   int        S_iBufferColumn;
  23.   
  24.       static void
  25. + myflush(void)
  26. + {
  27. +     if (S_linebufferpos != S_linebuffer)
  28. +     {
  29. +     _dosmemputw(S_linebuffer, (S_linebufferpos - S_linebuffer),
  30. +         S_ulScreenBase
  31. +               + S_iBufferRow * (Columns << 1) + (S_iBufferColumn << 1));
  32. +     S_linebufferpos = S_linebuffer;
  33. +     }
  34. + }
  35. +     static void
  36.   mygotoxy(int x, int y)
  37.   {
  38.       S_iCurrentRow = y - 1;
  39.       S_iCurrentColumn = x - 1;
  40.   }
  41.   
  42. + /*
  43. +  * Set the system cursor to our cursor position.
  44. +  */
  45. +     static void
  46. + set_sys_cursor(void)
  47. + {
  48. +     myflush();
  49. +     gotoxy(S_iCurrentColumn + 1, S_iCurrentRow + 1);
  50. + }
  51.       static void
  52.   setblankbuffer(unsigned short uiValue)
  53.   {
  54. ***************
  55. *** 222,239 ****
  56.                + (S_iBottom - 1) * (Columns << 1) + iColumn);
  57.   }
  58.   
  59. -     static void
  60. - myflush(void)
  61. - {
  62. -     if (S_linebufferpos != S_linebuffer)
  63. -     {
  64. -     _dosmemputw(S_linebuffer, (S_linebufferpos - S_linebuffer),
  65. -         S_ulScreenBase
  66. -               + S_iBufferRow * (Columns << 1) + (S_iBufferColumn << 1));
  67. -     S_linebufferpos = S_linebuffer;
  68. -     }
  69. - }
  70.       static int
  71.   myputch(int iChar)
  72.   {
  73. --- 244,249 ----
  74. ***************
  75. *** 1007,1014 ****
  76.       show_mouse(TRUE);
  77.   #endif
  78.   #ifdef DJGPP
  79. !     myflush();
  80. !     gotoxy(S_iCurrentColumn + 1, S_iCurrentRow + 1);
  81.   #endif
  82.       if (time >= 0)
  83.       {
  84. --- 1017,1023 ----
  85.       show_mouse(TRUE);
  86.   #endif
  87.   #ifdef DJGPP
  88. !     set_sys_cursor();
  89.   #endif
  90.       if (time >= 0)
  91.       {
  92. ***************
  93. *** 1895,1903 ****
  94.       stoptermcap();
  95.       set_interrupts(FALSE);        /* restore interrupts */
  96.   #ifdef DJGPP
  97. !     /* Let the system know where our cursor is. */
  98. !     myflush();
  99. !     gotoxy(S_iCurrentColumn + 1, S_iCurrentRow + 1);
  100.   #endif
  101.       /* Somehow outputting CR-NL causes the original colors to be restored */
  102.       out_char('\r');
  103. --- 1904,1910 ----
  104.       stoptermcap();
  105.       set_interrupts(FALSE);        /* restore interrupts */
  106.   #ifdef DJGPP
  107. !     set_sys_cursor();
  108.   #endif
  109.       /* Somehow outputting CR-NL causes the original colors to be restored */
  110.       out_char('\r');
  111. ***************
  112. *** 2102,2107 ****
  113. --- 2109,2117 ----
  114.   #endif
  115.   
  116.       out_flush();
  117. + #ifdef DJGPP
  118. +     set_sys_cursor();
  119. + #endif
  120.   
  121.       if (options & SHELL_COOKED)
  122.       settmode(TMODE_COOK);    /* set to normal mode */
  123. *** ../vim60.72/src/version.c    Sun Nov  4 19:10:16 2001
  124. --- src/version.c    Sun Nov  4 19:32:16 2001
  125. ***************
  126. *** 608,609 ****
  127. --- 608,611 ----
  128.   {   /* Add new patch number below this line */
  129. + /**/
  130. +     73,
  131.   /**/
  132.  
  133. -- 
  134. Engineers are widely recognized as superior marriage material: intelligent,
  135. dependable, employed, honest, and handy around the house.
  136.                 (Scott Adams - The Dilbert principle)
  137.  
  138.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  139. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  140.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  141.