changeset 17585:aefc22e52046

(skip_chars): Fix previous change in syntax/backward case.
author Richard M. Stallman <rms@gnu.org>
date Mon, 28 Apr 1997 00:49:41 +0000
parents 53a369ac3d2c
children b9ca2d28765c
files src/syntax.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.c	Sun Apr 27 22:41:00 1997 +0000
+++ b/src/syntax.c	Mon Apr 28 00:49:41 1997 +0000
@@ -1285,21 +1285,25 @@
 		  {
 		    int savepos = pos;
 		    DEC_POS (pos);
+		    UPDATE_SYNTAX_TABLE_BACKWARD (pos);
 		    if (!fastmap[(int) SYNTAX (FETCH_CHAR (pos))])
 		      {
 			pos = savepos;
 			break;
 		      }
-		    UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
 		  }
 	      }
 	    else
 	      {
-		while (pos > XINT (lim)
-		       && fastmap[(int) SYNTAX (FETCH_BYTE (pos - 1))])
+		while (pos > XINT (lim))
 		  {
 		    pos--;
-		    UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
+		    UPDATE_SYNTAX_TABLE_BACKWARD (pos);
+		    if (!fastmap[(int) SYNTAX (FETCH_BYTE (pos))])
+		      {
+			pos++;
+			break;
+		      }
 		  }
 	      }
 	  }