src/Pure/General/position.ML
changeset 26633 ff317b19e24e
parent 26052 7d5b3e34a735
child 26882 9e824d8f4512
--- a/src/Pure/General/position.ML	Sat Apr 12 17:00:47 2008 +0200
+++ b/src/Pure/General/position.ML	Sat Apr 12 17:00:47 2008 +0200
@@ -46,8 +46,9 @@
 val path = file o Path.implode o Path.expand;
 
 fun advance "\n" (Pos (SOME (m, _), props)) = Pos (SOME (m + 1, 1), props)
-  | advance sym (pos as Pos (SOME (m, n), props)) =
-      if Symbol.is_regular sym then Pos (SOME (m, n + 1), props) else pos
+  | advance s (pos as Pos (SOME (m, n), props)) =
+      if Symbol.is_regular s andalso not (Symbol.is_utf8_trailer s)
+      then Pos (SOME (m, n + 1), props) else pos
   | advance _ pos = pos;