(move_if_not_intangible): Force POSITION to be between BEGV and ZV.
authorRichard M. Stallman <rms@gnu.org>
Mon, 16 Aug 2004 22:52:29 +0000 (22:52 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 16 Aug 2004 22:52:29 +0000 (22:52 +0000)
src/intervals.c

index 33ef9a3..a822daf 100644 (file)
@@ -2275,6 +2275,10 @@ move_if_not_intangible (position)
          pos = Fnext_char_property_change (pos, Qnil);
 
     }
+  else if (position < BEGV)
+    position = BEGV;
+  else if (position > ZV)
+    position = ZV;
 
   /* If the whole stretch between PT and POSITION isn't intangible,
      try moving to POSITION (which means we actually move farther