emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108146: Fix up display of the *Minib


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108146: Fix up display of the *Minibuf-0* buffer in the mini window.
Date: Mon, 07 May 2012 12:09:51 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 108146
author: Jérémy Compostella <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2012-05-07 12:09:51 -0400
message:
  Fix up display of the *Minibuf-0* buffer in the mini window.
  * src/keyboard.c (read_char): Don't clear the echo area if there's no
  message to clear.
  * src/xdisp.c (redisplay_internal): Redisplay the mini window (with the
  contents of *Minibuf-0*) if there' no message displayed in its stead.
modified:
  src/ChangeLog
  src/keyboard.c
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-05-07 14:57:18 +0000
+++ b/src/ChangeLog     2012-05-07 16:09:51 +0000
@@ -1,3 +1,11 @@
+2012-05-07  Jérémy Compostella  <address@hidden>
+
+       Fix up display of the *Minibuf-0* buffer in the mini window.
+       * keyboard.c (read_char): Don't clear the echo area if there's no
+       message to clear.
+       * xdisp.c (redisplay_internal): Redisplay the mini window (with the
+       contents of *Minibuf-0*) if there' no message displayed in its stead.
+
 2012-05-07  Michael Albinus  <address@hidden>
 
        * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2012-05-04 23:16:47 +0000
+++ b/src/keyboard.c    2012-05-07 16:09:51 +0000
@@ -2996,8 +2996,10 @@
          && !(EQ (Qselect_window, XCAR (c)))))
     {
       if (!NILP (echo_area_buffer[0]))
-       safe_run_hooks (Qecho_area_clear_hook);
-      clear_message (1, 0);
+       {
+         safe_run_hooks (Qecho_area_clear_hook);
+         clear_message (1, 0);
+       }
     }
 
  reread_for_input_method:

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-05-02 07:20:29 +0000
+++ b/src/xdisp.c       2012-05-07 16:09:51 +0000
@@ -12727,6 +12727,9 @@
      frames.  Zero means, only selected_window is considered.  */
   int consider_all_windows_p;
 
+  /* Non-zero means redisplay has to redisplay the miniwindow */
+  int update_miniwindow_p = 0;
+
   TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p));
 
   /* No redisplay if running in batch mode or frame is not yet fully
@@ -12913,6 +12916,10 @@
          && !MINI_WINDOW_P (XWINDOW (selected_window))))
     {
       int window_height_changed_p = echo_area_display (0);
+
+      if (message_cleared_p)
+       update_miniwindow_p = 1;
+
       must_finish = 1;
 
       /* If we don't display the current message, don't clear the
@@ -12949,7 +12956,7 @@
 /* FIXME: this causes all frames to be updated, which seems unnecessary
    since only the current frame needs to be considered.  This function needs
    to be rewritten with two variables, consider_all_windows and
-   consider_all_frames. */
+   consider_all_frames.  */
       consider_all_windows_p = 1;
       ++windows_or_buffers_changed;
       ++update_mode_lines;
@@ -13135,7 +13142,8 @@
         then we can't just move the cursor.  */
       else if (! (!NILP (Vtransient_mark_mode)
                  && !NILP (BVAR (current_buffer, mark_active)))
-              && (EQ (selected_window, BVAR (current_buffer, 
last_selected_window))
+              && (EQ (selected_window,
+                      BVAR (current_buffer, last_selected_window))
                   || highlight_nonselected_windows)
               && NILP (w->region_showing)
               && NILP (Vshow_trailing_whitespace)
@@ -13288,7 +13296,7 @@
     }
   else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
     {
-      Lisp_Object mini_window;
+      Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf);
       struct frame *mini_frame;
 
       displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer);
@@ -13297,6 +13305,10 @@
       internal_condition_case_1 (redisplay_window_1, selected_window,
                                 list_of_error,
                                 redisplay_window_error);
+      if (update_miniwindow_p)
+       internal_condition_case_1 (redisplay_window_1, mini_window,
+                                  list_of_error,
+                                  redisplay_window_error);
 
       /* Compare desired and current matrices, perform output.  */
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]