summaryrefslogtreecommitdiff
path: root/src/data_forms.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-10-20 23:42:13 +0200
committerFlorent Le Coz <louiz@louiz.org>2013-10-20 23:42:13 +0200
commitb12a6b3ba993f7ee515b39edee1816a2b3587e6c (patch)
treeccfc8f7ae8e2424f284c9c344566ba921b30b225 /src/data_forms.py
parentdd4f8661a969233267c4ca30bf4f204dcb03e230 (diff)
downloadpoezio-b12a6b3ba993f7ee515b39edee1816a2b3587e6c.tar.gz
poezio-b12a6b3ba993f7ee515b39edee1816a2b3587e6c.tar.bz2
poezio-b12a6b3ba993f7ee515b39edee1816a2b3587e6c.tar.xz
poezio-b12a6b3ba993f7ee515b39edee1816a2b3587e6c.zip
Improve the input a lot
Noticeable changes: - The input "view" is smarter, it always move to a decent position so we can see enough text around the cursor. - The cursor goes at the end of the input when pasting some long text - The formatting chars (^C and o, b, a, 1, 2, 3 etc) are now visible in the input. This makes it a lot easier to know where these special characters are, to change them and efficiently edit our text (we just lose a little, on the cosmetic side, but who cares) - The code is actually a lot simpler in the functions to move the cursor, insert/delete chars: we do not have to deal with special cases where the formatting characters are actually composed of two chars. fixes #2183
Diffstat (limited to 'src/data_forms.py')
-rw-r--r--src/data_forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data_forms.py b/src/data_forms.py
index d38f392a..e1c96500 100644
--- a/src/data_forms.py
+++ b/src/data_forms.py
@@ -402,7 +402,7 @@ class TextPrivateWin(TextSingleWin):
self._win.erase()
if self.color:
self._win.attron(to_curses_attr(self.color))
- self.addstr('*'*len(self.text[self.line_pos:self.line_pos+self.width-1]))
+ self.addstr('*'*len(self.text[self.view_pos:self.view_pos+self.width-1]))
if self.color:
(y, x) = self._win.getyx()
size = self.width-x