From 5f37b5273c28b4c39cd8823db7049d5c768a973a Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Wed, 27 Jan 2010 23:12:40 +0000 Subject: [PATCH] =?UTF-8?q?on=20peut=20d=C3=A9border=20l'input=20(mais=20p?= =?UTF-8?q?as=20venir=20corriger=20le=20tout=20d=C3=A9but=20de=20la=20lign?= =?UTF-8?q?e=E2=80=A6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/window.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/window.py b/src/window.py index 1baefa42..5c4c1a32 100644 --- a/src/window.py +++ b/src/window.py @@ -240,6 +240,10 @@ class Input(Win): def do_command(self, key): (y, x) = self.win.getyx() + if x == self.width-1: + self.win.delch(0, 0) + self.win.move(y, x) + x -= 1 try: self.text = self.text[:self.pos]+key.decode('utf-8')+self.text[self.pos:] self.win.insstr(key) @@ -247,6 +251,7 @@ class Input(Win): return self.win.move(y, x+1) self.pos += 1 + self.refresh() def get_text(self): txt = self.text @@ -260,7 +265,6 @@ class Input(Win): self.txt = self.input.gather() def refresh(self): -# return self.win.noutrefresh() def clear_text(self):