equal
deleted
inserted
replaced
159 |
159 |
160 type text = string; |
160 type text = string; |
161 |
161 |
162 fun pad [] = [] |
162 fun pad [] = [] |
163 | pad [(s, _)] = [s] |
163 | pad [(s, _)] = [s] |
164 | pad ((s1, pos1) :: (rest as (s2, pos2) :: _)) = |
164 | pad ((s1, pos1) :: (rest as (_, pos2) :: _)) = |
165 let |
165 let |
166 val end_pos1 = Position.advance s1 pos1; |
166 val end_pos1 = Position.advance s1 pos1; |
167 val d = Int.max (0, Position.distance_of end_pos1 pos2); |
167 val d = Int.max (0, Position.distance_of end_pos1 pos2); |
168 in s1 :: replicate d Symbol.DEL @ pad rest end; |
168 in s1 :: replicate d Symbol.DEL @ pad rest end; |
169 |
169 |