summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-27 23:12:40 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-27 23:12:40 +0000
commit5f37b5273c28b4c39cd8823db7049d5c768a973a (patch)
tree5207c37b90fce67f30a48e9cba84bc4fd57bc333 /src
parente724584faa026c95362d85500351668b0d21290c (diff)
downloadpoezio-5f37b5273c28b4c39cd8823db7049d5c768a973a.tar.gz
poezio-5f37b5273c28b4c39cd8823db7049d5c768a973a.tar.bz2
poezio-5f37b5273c28b4c39cd8823db7049d5c768a973a.tar.xz
poezio-5f37b5273c28b4c39cd8823db7049d5c768a973a.zip
on peut déborder l'input (mais pas venir corriger le tout début de la ligne…)
Diffstat (limited to 'src')
-rw-r--r--src/window.py6
1 files changed, 5 insertions, 1 deletions
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):