aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-08-24 19:24:57 +0000
committerGerd Moellmann1999-08-24 19:24:57 +0000
commitc59c668a2dea56aa0e1fb7f4a0fb88d7bbfa3047 (patch)
treeca8fca52a387df65f63d6521a230a23077f4ddf2 /src
parentce7fae7db42af6978a379d87ab70ef12c2063ab7 (diff)
downloademacs-c59c668a2dea56aa0e1fb7f4a0fb88d7bbfa3047.tar.gz
emacs-c59c668a2dea56aa0e1fb7f4a0fb88d7bbfa3047.zip
(redisplay_window): Don't ever test just_this_one_p
before calling try_window. (echo_area_display): If height has changed, update other windows. (resize_mini_frame, resize_mini_initial_height): New. (resize_mini_window): Save/restore window configuration differently.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c104
1 files changed, 70 insertions, 34 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 45cbe13f977..742cd4c89f8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -481,7 +481,16 @@ static Lisp_Object Vmax_mini_window_height;
481 481
482/* Window configuration saved in resize_mini_window. */ 482/* Window configuration saved in resize_mini_window. */
483 483
484static Lisp_Object Vresize_mini_config; 484Lisp_Object Vresize_mini_config;
485
486/* Frmae of the mini-window being resized by resize_mini_window. */
487
488struct frame *resize_mini_frame;
489
490/* Initial height of the mini-window having been resized
491 by resize_mini_window. */
492
493int resize_mini_initial_height;
485 494
486/* A scratch glyph row with contents used for generating truncation 495/* A scratch glyph row with contents used for generating truncation
487 glyphs. Also used in direct_output_for_insert. */ 496 glyphs. Also used in direct_output_for_insert. */
@@ -5456,28 +5465,51 @@ resize_mini_window (w)
5456 else 5465 else
5457 SET_TEXT_POS (start, BEGV, BEGV_BYTE); 5466 SET_TEXT_POS (start, BEGV, BEGV_BYTE);
5458 SET_MARKER_FROM_TEXT_POS (w->start, start); 5467 SET_MARKER_FROM_TEXT_POS (w->start, start);
5459 5468
5460 /* Change window's height, if necessary. */ 5469 if (NILP (Vresize_mini_config))
5461 if (height > XFASTINT (w->height)
5462 || (height < XFASTINT (w->height)
5463 && NILP (Vresize_mini_config)))
5464 { 5470 {
5465 Lisp_Object old_selected_window; 5471 if (height != XFASTINT (w->height))
5472 {
5473 Lisp_Object old_selected_window;
5474 Lisp_Object config;
5475 struct gcpro gcpro1;
5476
5477 resize_mini_initial_height = XFASTINT (w->height);
5478 config = Fcurrent_window_configuration (Qnil);
5479 GCPRO1 (config);
5480
5481 old_selected_window = selected_window;
5482 XSETWINDOW (selected_window, w);
5483 change_window_height (height - XFASTINT (w->height), 0);
5484 selected_window = old_selected_window;
5485
5486 window_height_changed_p = 1;
5466 5487
5467 if (NILP (Vresize_mini_config)) 5488 /* Set this after changing window sizes, or else
5468 Vresize_mini_config = Fcurrent_window_configuration (Qnil); 5489 Vresize_mini_config would be reset in
5469 5490 adjust_frame_glyphs. */
5470 old_selected_window = selected_window; 5491 resize_mini_frame = XFRAME (w->frame);
5471 XSETWINDOW (selected_window, w); 5492 Vresize_mini_config = config;
5472 change_window_height (height - XFASTINT (w->height), 0); 5493 UNGCPRO;
5473 selected_window = old_selected_window; 5494 }
5474 window_height_changed_p = 1;
5475 } 5495 }
5476 else if (height < XFASTINT (w->height) 5496 else if (height != XFASTINT (w->height))
5477 && !NILP (Vresize_mini_config))
5478 { 5497 {
5479 Fset_window_configuration (Vresize_mini_config); 5498 if (height == resize_mini_initial_height)
5480 Vresize_mini_config = Qnil; 5499 {
5500 Fset_window_configuration (Vresize_mini_config);
5501 Vresize_mini_config = Qnil;
5502 resize_mini_frame = NULL;
5503 }
5504 else
5505 {
5506 Lisp_Object old_selected_window;
5507 old_selected_window = selected_window;
5508 XSETWINDOW (selected_window, w);
5509 change_window_height (height - XFASTINT (w->height), 0);
5510 selected_window = old_selected_window;
5511 }
5512
5481 window_height_changed_p = 1; 5513 window_height_changed_p = 1;
5482 } 5514 }
5483 } 5515 }
@@ -5799,12 +5831,20 @@ echo_area_display (update_frame_p)
5799 echo_area_window = mini_window; 5831 echo_area_window = mini_window;
5800 window_height_changed_p = display_echo_area (w); 5832 window_height_changed_p = display_echo_area (w);
5801 w->must_be_updated_p = 1; 5833 w->must_be_updated_p = 1;
5802 5834
5803 if (update_frame_p) 5835 if (update_frame_p)
5804 { 5836 {
5805 /* Calling update_single_window is faster when we can use 5837 /* Not called from redisplay_internal. If we changed
5806 window-based redisplay. */ 5838 window configuration, we must redisplay thoroughly.
5807 if (FRAME_WINDOW_P (f)) 5839 Otherwise, we can do with updating what we displayed
5840 above. */
5841 if (window_height_changed_p)
5842 {
5843 ++windows_or_buffers_changed;
5844 ++update_mode_lines;
5845 redisplay_internal (0);
5846 }
5847 else if (FRAME_WINDOW_P (f))
5808 { 5848 {
5809 update_single_window (w, 1); 5849 update_single_window (w, 1);
5810 rif->flush_display (f); 5850 rif->flush_display (f);
@@ -5815,7 +5855,8 @@ echo_area_display (update_frame_p)
5815 } 5855 }
5816 else if (!EQ (mini_window, selected_window)) 5856 else if (!EQ (mini_window, selected_window))
5817 windows_or_buffers_changed++; 5857 windows_or_buffers_changed++;
5818 5858
5859 /* Last displayed message is now the current message. */
5819 echo_area_buffer[1] = echo_area_buffer[0]; 5860 echo_area_buffer[1] = echo_area_buffer[0];
5820 5861
5821 /* Prevent redisplay optimization in redisplay_internal by resetting 5862 /* Prevent redisplay optimization in redisplay_internal by resetting
@@ -8607,8 +8648,7 @@ redisplay_window (window, just_this_one_p)
8607 /* Window must be either use window-based redisplay or 8648 /* Window must be either use window-based redisplay or
8608 be full width. */ 8649 be full width. */
8609 && (FRAME_WINDOW_P (f) 8650 && (FRAME_WINDOW_P (f)
8610 || ((line_ins_del_ok && WINDOW_FULL_WIDTH_P (w)) 8651 || (line_ins_del_ok && WINDOW_FULL_WIDTH_P (w)))
8611 && just_this_one_p))
8612 && !MINI_WINDOW_P (w) 8652 && !MINI_WINDOW_P (w)
8613 /* Point is not known NOT to appear in window. */ 8653 /* Point is not known NOT to appear in window. */
8614 && PT >= CHARPOS (startp) 8654 && PT >= CHARPOS (startp)
@@ -9495,14 +9535,10 @@ get_last_unchanged_at_beg_row (w)
9495/* Find the first glyph row in the current matrix of W that is not 9535/* Find the first glyph row in the current matrix of W that is not
9496 affected by changes at the end of current_buffer since the last 9536 affected by changes at the end of current_buffer since the last
9497 time the window was redisplayed. Return in *DELTA the number of 9537 time the window was redisplayed. Return in *DELTA the number of
9498 bytes by which buffer positions in unchanged text at the end of 9538 chars by which buffer positions in unchanged text at the end of
9499 current_buffer must be adjusted. Value is null if no such row 9539 current_buffer must be adjusted. Return in *DELTA_BYTES the
9500 exists, i.e. all rows are affected by changes. 9540 corresponding number of bytes. Value is null if no such row
9501 9541 exists, i.e. all rows are affected by changes. */
9502 The global variable end_unchanged is assumed to contain the number
9503 of unchanged bytes at the end of current_buffer. The buffer
9504 position of the last changed byte in current_buffer is then Z -
9505 end_unchanged. */
9506 9542
9507static struct glyph_row * 9543static struct glyph_row *
9508get_first_unchanged_at_end_row (w, delta, delta_bytes) 9544get_first_unchanged_at_end_row (w, delta, delta_bytes)