changeset 21763:b685f9451792

(change_frame_size_1): Use FRAME_CURSOR_X_LIMIT. (update_frame): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Sat, 25 Apr 1998 23:08:09 +0000
parents b2746acaa663
children 9d02cc13f771
files src/dispnew.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispnew.c	Sat Apr 25 23:07:46 1998 +0000
+++ b/src/dispnew.c	Sat Apr 25 23:08:09 1998 +0000
@@ -1360,7 +1360,7 @@
 	      while (row > top && col == 0);
 
 	      /* Make sure COL is not out of range.  */
-	      if (col >= FRAME_WIDTH (f) + FRAME_LEFT_SCROLL_BAR_WIDTH (f))
+	      if (col >= FRAME_CURSOR_X_LIMIT (f))
 		{
 		  /* If we have another row, advance cursor into it.  */
 		  if (row < FRAME_HEIGHT (f) - 1)
@@ -1370,7 +1370,7 @@
 		    }
 		  /* Otherwise move it back in range.  */
 		  else
-		    col = FRAME_WIDTH (f) + FRAME_LEFT_SCROLL_BAR_WIDTH (f);
+		    col = FRAME_CURSOR_X_LIMIT (f) - 1;
 		}
 	    }
 
@@ -1378,7 +1378,8 @@
 	}
       else
 	cursor_to (FRAME_CURSOR_Y (f), 
-		   minmax (0, FRAME_CURSOR_X (f), FRAME_WINDOW_WIDTH (f) - 1));
+		   minmax (0, FRAME_CURSOR_X (f),
+			   FRAME_CURSOR_X_LIMIT (f) - 1));
     }
 
   update_end (f);
@@ -2246,8 +2247,8 @@
   FRAME_HEIGHT (frame) = newheight;
   SET_FRAME_WIDTH (frame, newwidth);
 
-  if (FRAME_CURSOR_X (frame) >= FRAME_WINDOW_WIDTH (frame))
-    FRAME_CURSOR_X (frame) = FRAME_WINDOW_WIDTH (frame) - 1;
+  if (FRAME_CURSOR_X (frame) >= FRAME_CURSOR_X_LIMIT (frame))
+    FRAME_CURSOR_X (frame) = FRAME_CURSOR_X_LIMIT (frame) - 1;
   if (FRAME_CURSOR_Y (frame) >= FRAME_HEIGHT (frame))
     FRAME_CURSOR_Y (frame) = FRAME_HEIGHT (frame) - 1;