Revert incorrect logic in 2011-03-06T07:50:01Z!eggert@cs.ucla.edu.
authorChong Yidong <cyd@stupidchicken.com>
Sun, 6 Mar 2011 23:19:25 +0000 (18:19 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 6 Mar 2011 23:19:25 +0000 (18:19 -0500)
* src/xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 change.

src/ChangeLog
src/xdisp.c

index a96edcd..d713109 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-06  Chong Yidong  <cyd@stupidchicken.com>
+
+       * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06
+       change.
+
 2011-03-06  Paul Eggert  <eggert@cs.ucla.edu>
 
        current_column: Now returns EMACS_INT, fixing some iftc
index 44cb713..e62b491 100644 (file)
@@ -13697,6 +13697,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
   int buffer_unchanged_p = 0;
   int temp_scroll_step = 0;
   int count = SPECPDL_INDEX ();
+  int rc;
   int centering_position = -1;
   int last_line_misfit = 0;
   EMACS_INT beg_unchanged, end_unchanged;
@@ -14008,15 +14009,12 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
   /* Handle case where text has not changed, only point, and it has
      not moved off the frame, and we are not retrying after hscroll.
      (current_matrix_up_to_date_p is nonzero when retrying.)  */
-  if (current_matrix_up_to_date_p)
+  if (current_matrix_up_to_date_p
+      && (rc = try_cursor_movement (window, startp, &temp_scroll_step),
+         rc != CURSOR_MOVEMENT_CANNOT_BE_USED))
     {
-      int rc = try_cursor_movement (window, startp, &temp_scroll_step);
-
       switch (rc)
        {
-       case CURSOR_MOVEMENT_CANNOT_BE_USED:
-         break;
-
        case CURSOR_MOVEMENT_SUCCESS:
          used_current_matrix_p = 1;
          goto done;