aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-09-10 09:30:10 +0200
committerMattias Andrée <maandree@operamail.com>2013-09-10 09:30:10 +0200
commit62b6cd148ed43df5e63528feead4040ebdfc2410 (patch)
treef64296958cd055ab1cd60c16200f1312b2eb793f
parentfix delete key regression (diff)
downloadpytagomacs-62b6cd148ed43df5e63528feead4040ebdfc2410.tar.gz
pytagomacs-62b6cd148ed43df5e63528feead4040ebdfc2410.tar.bz2
pytagomacs-62b6cd148ed43df5e63528feead4040ebdfc2410.tar.xz
fix up and down arrow jump bug
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/editor.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/editor.py b/src/editor.py
index 4f0386d..ee64ee7 100644
--- a/src/editor.py
+++ b/src/editor.py
@@ -558,15 +558,13 @@ class TextArea():
self.alert('At first line')
else:
self.y -= 1
- self.mark = None
- self.x = 0
+ self.mark, self.x, self.offx = None, 0, 0
elif d == ctrl('N'):
if self.y == len(self.lines) - 1:
self.alert('At last line')
else:
self.y += 1
- self.mark = None
- self.x = 0
+ self.mark, self.x, self.offx = None, 0, 0
elif d == ctrl('D'): edit(lambda L : L.delete(), 'At end')
elif d == ctrl('F'): move_point(1, 'At end')
elif d == ctrl('E'): move_point(len(self.lines[self.y].text) - self.x, 'At end')