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 / 7.2 / 7.2.398 < prev    next >
Encoding:
Internet Message Format  |  2010-03-16  |  4.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.2.398
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.2.398
  11. Problem:    When moving windows the cursor ends up in the wrong line.
  12. Solution:   Set the window width and height properly. (Lech Lorens)
  13. Files:        src/window.c
  14.  
  15.  
  16. *** ../vim-7.2.397/src/window.c    2010-01-27 20:26:41.000000000 +0100
  17. --- src/window.c    2010-03-17 16:40:06.000000000 +0100
  18. ***************
  19. *** 991,1018 ****
  20.       wp->w_p_scr = curwin->w_p_scr;
  21.       if (need_status)
  22.       {
  23. !         --oldwin->w_height;
  24.           oldwin->w_status_height = need_status;
  25.       }
  26.       if (flags & (WSP_TOP | WSP_BOT))
  27.       {
  28.           /* set height and row of new window to full height */
  29.           wp->w_winrow = tabline_height();
  30. !         wp->w_height = curfrp->fr_height - (p_ls > 0);
  31.           wp->w_status_height = (p_ls > 0);
  32.       }
  33.       else
  34.       {
  35.           /* height and row of new window is same as current window */
  36.           wp->w_winrow = oldwin->w_winrow;
  37. !         wp->w_height = oldwin->w_height;
  38.           wp->w_status_height = oldwin->w_status_height;
  39.       }
  40.       frp->fr_height = curfrp->fr_height;
  41.   
  42.       /* "new_size" of the current window goes to the new window, use
  43.        * one column for the vertical separator */
  44. !     wp->w_width = new_size;
  45.       if (before)
  46.           wp->w_vsep_width = 1;
  47.       else
  48. --- 991,1018 ----
  49.       wp->w_p_scr = curwin->w_p_scr;
  50.       if (need_status)
  51.       {
  52. !         win_new_height(oldwin, oldwin->w_height - 1);
  53.           oldwin->w_status_height = need_status;
  54.       }
  55.       if (flags & (WSP_TOP | WSP_BOT))
  56.       {
  57.           /* set height and row of new window to full height */
  58.           wp->w_winrow = tabline_height();
  59. !         win_new_height(wp, curfrp->fr_height - (p_ls > 0));
  60.           wp->w_status_height = (p_ls > 0);
  61.       }
  62.       else
  63.       {
  64.           /* height and row of new window is same as current window */
  65.           wp->w_winrow = oldwin->w_winrow;
  66. !         win_new_height(wp, oldwin->w_height);
  67.           wp->w_status_height = oldwin->w_status_height;
  68.       }
  69.       frp->fr_height = curfrp->fr_height;
  70.   
  71.       /* "new_size" of the current window goes to the new window, use
  72.        * one column for the vertical separator */
  73. !     win_new_width(wp, new_size);
  74.       if (before)
  75.           wp->w_vsep_width = 1;
  76.       else
  77. ***************
  78. *** 1049,1061 ****
  79.       if (flags & (WSP_TOP | WSP_BOT))
  80.       {
  81.           wp->w_wincol = 0;
  82. !         wp->w_width = Columns;
  83.           wp->w_vsep_width = 0;
  84.       }
  85.       else
  86.       {
  87.           wp->w_wincol = oldwin->w_wincol;
  88. !         wp->w_width = oldwin->w_width;
  89.           wp->w_vsep_width = oldwin->w_vsep_width;
  90.       }
  91.       frp->fr_width = curfrp->fr_width;
  92. --- 1049,1061 ----
  93.       if (flags & (WSP_TOP | WSP_BOT))
  94.       {
  95.           wp->w_wincol = 0;
  96. !         win_new_width(wp, Columns);
  97.           wp->w_vsep_width = 0;
  98.       }
  99.       else
  100.       {
  101.           wp->w_wincol = oldwin->w_wincol;
  102. !         win_new_width(wp, oldwin->w_width);
  103.           wp->w_vsep_width = oldwin->w_vsep_width;
  104.       }
  105.       frp->fr_width = curfrp->fr_width;
  106. ***************
  107. *** 1111,1117 ****
  108.       }
  109.   
  110.       /*
  111. !      * make the new window the current window and redraw
  112.        */
  113.       if (do_equal || dir != 0)
  114.       win_equal(wp, TRUE,
  115. --- 1111,1117 ----
  116.       }
  117.   
  118.       /*
  119. !      * equalize the window sizes.
  120.        */
  121.       if (do_equal || dir != 0)
  122.       win_equal(wp, TRUE,
  123. ***************
  124. *** 1143,1148 ****
  125. --- 1143,1152 ----
  126.       if (size != 0)
  127.           p_wh = size;
  128.       }
  129. +     /*
  130. +      * make the new window the current window
  131. +      */
  132.       win_enter(wp, FALSE);
  133.   #ifdef FEAT_VERTSPLIT
  134.       if (flags & WSP_VERT)
  135. *** ../vim-7.2.397/src/version.c    2010-03-17 16:45:04.000000000 +0100
  136. --- src/version.c    2010-03-17 16:53:51.000000000 +0100
  137. ***************
  138. *** 683,684 ****
  139. --- 683,686 ----
  140.   {   /* Add new patch number below this line */
  141. + /**/
  142. +     398,
  143.   /**/
  144.  
  145. -- 
  146. It's not hard to meet expenses, they're everywhere.
  147.  
  148.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  149. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  150. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  151.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  152.