summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-16 14:02:36 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-16 14:02:36 +0000
commitfe9a7ca7bb883a68f70c6f3949d7f5902cdf384b (patch)
tree613b4730036bd90278f23acbb172f1d15be78db9
parentbaaf9102830f2a9d855dea64cba8b16a45cd2380 (diff)
downloadpoezio-fe9a7ca7bb883a68f70c6f3949d7f5902cdf384b.tar.gz
poezio-fe9a7ca7bb883a68f70c6f3949d7f5902cdf384b.tar.bz2
poezio-fe9a7ca7bb883a68f70c6f3949d7f5902cdf384b.tar.xz
poezio-fe9a7ca7bb883a68f70c6f3949d7f5902cdf384b.zip
fixed #1174
-rw-r--r--src/window.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/window.py b/src/window.py
index 52865d09..54ff4353 100644
--- a/src/window.py
+++ b/src/window.py
@@ -353,7 +353,7 @@ class Input(Win):
def auto_completion(self, user_list):
if self.pos != len(self.text) or len(self.text) == 0:
- return # we don't complete if cursos is not at the end of line
+ return # we don't complete if cursor is not at the end of line
completion_type = config.get('completion', 'normal')
if completion_type == 'shell':
self.shell_completion(user_list)
@@ -365,7 +365,10 @@ class Input(Win):
self.last_key_tab = False
def normal_completion(self, user_list):
- after = config.get('after_completion', ',')+" "
+ if " " in self.text:
+ after = " " # don't put the "," if it's not the begining of the sentence
+ else:
+ after = config.get('after_completion', ',')+" "
(y, x) = self.win.getyx()
if not self.last_key_tab:
# begin is the begining of the nick we want to complete
@@ -395,6 +398,10 @@ class Input(Win):
self.refresh()
def shell_completion(self, user_list):
+ if " " in self.text:
+ after = " " # don't put the "," if it's not the begining of the sentence
+ else:
+ after = config.get('after_completion', ',')+" "
after = config.get('after_completion', ',')+" "
(y, x) = self.win.getyx()
begin = self.text.split()[-1].encode('utf-8').lower()