diff options
| author | Mattias Andrée <maandree@operamail.com> | 2013-08-06 02:48:10 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2013-08-06 02:48:10 +0200 |
| commit | 0ffb81d6602c37f3d5c1af88190d5d661eb671fe (patch) | |
| tree | 7b6f8e9829091c0fb72df6110d6f6cd6e2fafc5d /src | |
| parent | partially working remake of the editor (diff) | |
| download | pytagomacs-0ffb81d6602c37f3d5c1af88190d5d661eb671fe.tar.gz pytagomacs-0ffb81d6602c37f3d5c1af88190d5d661eb671fe.tar.bz2 pytagomacs-0ffb81d6602c37f3d5c1af88190d5d661eb671fe.tar.xz | |
fix that insert mode visually overrides
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/editor.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/editor.py b/src/editor.py index 1d50106..1548fff 100644 --- a/src/editor.py +++ b/src/editor.py @@ -190,6 +190,8 @@ class TextArea(): self.text = self.text[:a] + insert + self.text[b:] self.area.x += len(insert) if self.area.x - self.area.offx < self.area.areawidth: + if not override: + print('\033[%i@' % len(insert), end='') print(insert, end='') else: self.area.offx = len(self.text) - self.area.areawidth |
