]> code.delx.au - gnu-emacs/commitdiff
(set_window_buffer): Fix redisplay problems when
authorKim F. Storm <storm@cua.dk>
Wed, 24 Sep 2003 23:52:45 +0000 (23:52 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 24 Sep 2003 23:52:45 +0000 (23:52 +0000)
switching between buffers with different display margin widths.

src/window.c

index b61db3ffbb0beb10fc251591e0297f52b71c9821..ce7b086833e5340e35d47f91d7417b53d13dd0d5 100644 (file)
@@ -2853,6 +2853,9 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
 
       /* This may call adjust_window_margins three times, so
         temporarily disable window margins.  */
+      Lisp_Object save_left = w->left_margin_cols;
+      Lisp_Object save_right = w->right_margin_cols;
+
       w->left_margin_cols = w->right_margin_cols = Qnil;
 
       Fset_window_fringes (window,
@@ -2863,6 +2866,9 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
                               b->scroll_bar_width,
                               b->vertical_scroll_bar_type, Qnil);
 
+      w->left_margin_cols = save_left;
+      w->right_margin_cols = save_right;
+
       Fset_window_margins (window,
                           b->left_margin_cols, b->right_margin_cols);
     }