From d44a11aee90e89aeb8ce13be1e6812404381f921 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 28 Aug 2008 21:32:36 +1000 Subject: [PATCH] Allowing inserting a line break in the middle of a text this makes two texts. They cannot (yet) be joined again. --- scribble.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scribble.py b/scribble.py index 8d13a91..b0dbbfb 100755 --- a/scribble.py +++ b/scribble.py @@ -917,9 +917,11 @@ class ScribblePad: if self.textcurs < len(self.textstr): self.textcurs += 1 elif sym == "": + tail = self.textstr[self.textcurs:] + self.textstr = self.textstr[:self.textcurs] self.flush_text() - self.textcurs = 0 - self.textstr = "" + self.textcurs = len(tail) + self.textstr = tail self.textpos = [ self.textpos[0], self.textpos[1] + self.lineheight ] else: -- 2.39.5