changeset 5223:db2e7e6a488e

(Fsit_for): Call prepare_menu_bars. (direct_output_forward_char): Give up if in truncated text at end of line.
author Richard M. Stallman <rms@gnu.org>
date Thu, 23 Dec 1993 00:22:10 +0000
parents 20c59adcb164
children 5831f83a0afe
files src/dispnew.c
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispnew.c	Wed Dec 22 17:18:49 1993 +0000
+++ b/src/dispnew.c	Thu Dec 23 00:22:10 1993 +0000
@@ -928,7 +928,12 @@
   register FRAME_PTR frame = selected_frame;
   register struct window *w = XWINDOW (selected_window);
   int position;
-  
+  int hpos = FRAME_CURSOR_X (frame);
+
+  /* Give up if in truncated text at end of line.  */
+  if (hpos >= XFASTINT (w->left) + window_internal_width (w) - 1)
+    return 0;
+
   /* Avoid losing if cursor is in invisible text off left margin
      or about to go off either side of window.  */
   if ((FRAME_CURSOR_X (frame) == XFASTINT (w->left)
@@ -1959,8 +1964,9 @@
 /* This is just like wait_reading_process_input, except that
    it does the redisplay.
 
-   It's also just like Fsit_for, except that it can be used for
-   waiting for input as well.  */
+   It's also much like Fsit_for, except that it can be used for
+   waiting for input as well.  One differnce is that sit_for
+   does not call prepare_menu_bars; Fsit_for does call that.  */
 
 Lisp_Object
 sit_for (sec, usec, reading, display)
@@ -2051,6 +2057,8 @@
     error ("millisecond `sit-for' not supported on %s", SYSTEM_TYPE);
 #endif
 
+  if (NILP (nodisp))
+    prepare_menu_bars ();
   return sit_for (sec, usec, 0, NILP (nodisp));
 }