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.257 < prev    next >
Encoding:
Internet Message Format  |  2002-11-18  |  3.4 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.257
  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.257
  11. Problem:    ":cwindow" always sets the previous window to the last but one
  12.         window.  (Benji Fisher)
  13. Solution:   Set the previous window properly.
  14. Files:        src/globals.c, src/quickfix.c, src/window.c
  15.  
  16.  
  17. *** ../vim61.256/src/globals.h    Sun Nov 10 13:33:34 2002
  18. --- src/globals.h    Wed Nov 13 20:03:07 2002
  19. ***************
  20. *** 364,371 ****
  21.    * Without the FEAT_WINDOWS they are all equal.
  22.    */
  23.   #ifdef FEAT_WINDOWS
  24. ! EXTERN win_T    *firstwin;    /* first window */
  25. ! EXTERN win_T    *lastwin;    /* last window */
  26.   # define W_NEXT(wp) ((wp)->w_next)
  27.   # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
  28.   #else
  29. --- 364,372 ----
  30.    * Without the FEAT_WINDOWS they are all equal.
  31.    */
  32.   #ifdef FEAT_WINDOWS
  33. ! EXTERN win_T    *firstwin;        /* first window */
  34. ! EXTERN win_T    *lastwin;        /* last window */
  35. ! EXTERN win_T    *prevwin INIT(= NULL);    /* previous window */
  36.   # define W_NEXT(wp) ((wp)->w_next)
  37.   # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
  38.   #else
  39. *** ../vim61.256/src/quickfix.c    Mon Sep 23 21:32:08 2002
  40. --- src/quickfix.c    Wed Nov 13 20:02:10 2002
  41. ***************
  42. *** 1567,1572 ****
  43. --- 1567,1575 ----
  44.       win_goto(win);
  45.       else
  46.       {
  47. +     /* The current window becomes the previous window afterwards. */
  48. +     win = curwin;
  49.       /* Create the new window at the very bottom. */
  50.       win_goto(lastwin);
  51.       if (win_split(height, WSP_BELOW) == FAIL)
  52. ***************
  53. *** 1593,1598 ****
  54. --- 1596,1603 ----
  55.       if (curwin->w_width == Columns)
  56.           win_setheight(height);
  57.       curwin->w_p_wfh = TRUE;        /* set 'winfixheight' */
  58. +     if (win_valid(win))
  59. +         prevwin = win;
  60.       }
  61.   
  62.       /*
  63. *** ../vim61.256/src/window.c    Tue Oct  8 20:05:55 2002
  64. --- src/window.c    Wed Nov 13 20:02:38 2002
  65. ***************
  66. *** 65,71 ****
  67.   static int check_snapshot_rec __ARGS((frame_T *sn, frame_T *fr));
  68.   static win_T *restore_snapshot_rec __ARGS((frame_T *sn, frame_T *fr));
  69.   
  70. - static win_T    *prevwin = NULL;    /* previous window */
  71.   #endif /* FEAT_WINDOWS */
  72.   static void win_setheight_win __ARGS((int height, win_T *win));
  73.   static win_T *win_alloc __ARGS((win_T *after));
  74. --- 65,70 ----
  75. ***************
  76. *** 1889,1895 ****
  77.       if (wp->w_p_pvw || bt_quickfix(wp->w_buffer))
  78.       {
  79.           /*
  80. !          * When the cursor goes to the preview or the quickfix window, try
  81.            * finding another window to go to.
  82.            */
  83.           for (;;)
  84. --- 1888,1894 ----
  85.       if (wp->w_p_pvw || bt_quickfix(wp->w_buffer))
  86.       {
  87.           /*
  88. !          * The cursor goes to the preview or the quickfix window, try
  89.            * finding another window to go to.
  90.            */
  91.           for (;;)
  92. *** ../vim61.256/src/version.c    Tue Nov 19 11:17:56 2002
  93. --- src/version.c    Tue Nov 19 11:19:37 2002
  94. ***************
  95. *** 608,609 ****
  96. --- 608,611 ----
  97.   {   /* Add new patch number below this line */
  98. + /**/
  99. +     257,
  100.   /**/
  101.  
  102. -- 
  103. hundred-and-one symptoms of being an internet addict:
  104. 84. Books in your bookcase bear the names Bongo, WinSock and Inside OLE
  105.  
  106.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  107. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  108. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  109.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  110.