]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.608 v7.3.608
authorBram Moolenaar <Bram@vim.org>
Thu, 19 Jul 2012 16:05:44 +0000 (18:05 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 19 Jul 2012 16:05:44 +0000 (18:05 +0200)
Problem:    winrestview() does not always restore the view correctly.
Solution:   Call win_new_height() and win_new_width(). (Lech Lorens)

src/eval.c
src/proto/window.pro
src/version.c
src/window.c

index f9db2f9ffeb483d6fb0a8843237d265f75ec9056..b83334c361c31305e96bae757ca5964e6bd18f2c 100644 (file)
@@ -18601,6 +18601,10 @@ f_winrestview(argvars, rettv)
        curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol");
 
        check_cursor();
+       win_new_height(curwin, curwin->w_height);
+# ifdef FEAT_VERTSPLIT
+       win_new_width(curwin, W_WIDTH(curwin));
+# endif
        changed_window_setting();
 
        if (curwin->w_topline == 0)
index 847b64bb5088f76709e28a651ff61791563ca1c6..92229692f52f8f6909541137922592f8ebe2348b 100644 (file)
@@ -51,6 +51,8 @@ void win_setwidth_win __ARGS((int width, win_T *wp));
 void win_setminheight __ARGS((void));
 void win_drag_status_line __ARGS((win_T *dragwin, int offset));
 void win_drag_vsep_line __ARGS((win_T *dragwin, int offset));
+void win_new_height __ARGS((win_T *wp, int height));
+void win_new_width __ARGS((win_T *wp, int width));
 void win_comp_scroll __ARGS((win_T *wp));
 void command_height __ARGS((void));
 void last_status __ARGS((int morewin));
index 5dd3776c45cf9010534822716b77970f1c630de5..c8a283e06b924b9ae7422753bcb9a7a81d9dcbfc 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    608,
 /**/
     607,
 /**/
index c0b7b8b91b4666a0c1dc0d83f98e80fd41a7f3ed..e1dc940398d54d9987e9587b48fa6e279c59cc25 100644 (file)
@@ -54,7 +54,6 @@ static void frame_append __ARGS((frame_T *after, frame_T *frp));
 static void frame_insert __ARGS((frame_T *before, frame_T *frp));
 static void frame_remove __ARGS((frame_T *frp));
 #ifdef FEAT_VERTSPLIT
-static void win_new_width __ARGS((win_T *wp, int width));
 static void win_goto_ver __ARGS((int up, long count));
 static void win_goto_hor __ARGS((int left, long count));
 #endif
@@ -71,7 +70,6 @@ static win_T *restore_snapshot_rec __ARGS((frame_T *sn, frame_T *fr));
 
 static win_T *win_alloc __ARGS((win_T *after, int hidden));
 static void set_fraction __ARGS((win_T *wp));
-static void win_new_height __ARGS((win_T *wp, int height));
 
 #define URL_SLASH      1               /* path_is_url() has found "://" */
 #define URL_BACKSLASH  2               /* path_is_url() has found ":\\" */
@@ -5557,7 +5555,7 @@ set_fraction(wp)
  * This takes care of the things inside the window, not what happens to the
  * window position, the frame or to other windows.
  */
-    static void
+    void
 win_new_height(wp, height)
     win_T      *wp;
     int                height;
@@ -5697,7 +5695,7 @@ win_new_height(wp, height)
 /*
  * Set the width of a window.
  */
-    static void
+    void
 win_new_width(wp, width)
     win_T      *wp;
     int                width;