changeset 11108:ad6e21535db6

(redisplay): Make sure pause is set before used. Delete unused vars. (redisplay_window): Make sure update_mode_line is set before used. If startp might not have been set, use w->start directly. (try_window_id): In the easy case, find cursor pos before returning.
author Karl Heuer <kwzh@gnu.org>
date Fri, 24 Mar 1995 00:35:46 +0000
parents 5358a0febe7a
children d67cbc284d24
files src/xdisp.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Thu Mar 23 21:44:59 1995 +0000
+++ b/src/xdisp.c	Fri Mar 24 00:35:46 1995 +0000
@@ -745,7 +745,6 @@
   int all_windows;
   register int tlbufpos, tlendpos;
   struct position pos;
-  extern int input_pending;
 
   if (noninteractive)
     return;
@@ -864,7 +863,6 @@
 		  int left = XFASTINT (w->left);
 		  int *charstart_next_line
 		    = FRAME_CURRENT_GLYPHS (XFRAME (WINDOW_FRAME (w)))->charstarts[this_line_vpos + 1];
-		  int i;
 		  int adjust;
 
 		  if (Z - tlendpos == ZV)
@@ -1013,6 +1011,8 @@
     {
       if (FRAME_VISIBLE_P (selected_frame))
 	pause = update_frame (selected_frame, 0, 0);
+      else
+	pause = 0;
 
       /* We may have called echo_area_display at the top of this
 	 function.  If the echo area is on another frame, that may
@@ -1268,6 +1268,7 @@
     abort ();
   
   height = window_internal_height (w);
+  update_mode_line = (!NILP (w->update_mode_line) || update_mode_lines);
 
   if (MINI_WINDOW_P (w))
     {
@@ -1294,8 +1295,6 @@
 	}
     }
 
-  update_mode_line = (!NILP (w->update_mode_line) || update_mode_lines);
-
   /* Otherwise set up data on this window; select its buffer and point value */
 
   if (update_mode_line)
@@ -1617,7 +1616,7 @@
 	  || (w == XWINDOW (minibuf_window) && ! echo_area_glyphs))
 	{
 	  whole = ZV - BEGV;
-	  start = startp - BEGV;
+	  start = marker_position (w->start) - BEGV;
 	  /* I don't think this is guaranteed to be right.  For the
 	     moment, we'll pretend it is.  */
 	  end = (Z - XINT (w->window_end_pos)) - BEGV;
@@ -1771,7 +1770,7 @@
 				width, hscroll, pos_tab_offset (w, start), w);
 	  XSETFASTINT (w->window_end_vpos, height);
 	  XSETFASTINT (w->window_end_pos, Z - bp.bufpos);
-	  return 1;
+	  goto findpoint;
 	}
       return 0;
     }
@@ -2078,6 +2077,7 @@
   /* If point was not in a line that was displayed, find it */
   if (cursor_vpos < 0)
     {
+    findpoint:
       val = *compute_motion (start, 0, lmargin, PT, 10000, 10000,
 			     width, hscroll, pos_tab_offset (w, start), w);
       /* Admit failure if point is off frame now */