Fix: text -> self.text in clone method.

This commit is contained in:
Barry Downes 2023-08-05 15:37:08 +10:00
parent 222718035f
commit 6995bb435c

View File

@ -66,7 +66,7 @@ class Cursor:
def clone(self): def clone(self):
# python's immutable strings should mean the actual string data for text is not copied # python's immutable strings should mean the actual string data for text is not copied
clone = Cursor(text) clone = Cursor(self.text, skip_space=self.skip_space, consume=self.consume, space=self.space)
# pos is the main purpose of the clone # pos is the main purpose of the clone
clone.pos = self.pos clone.pos = self.pos
# this other stuff, we're just cloning for completeness # this other stuff, we're just cloning for completeness