summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/default_config.cfg8
-rw-r--r--doc/en/configure.txt9
-rw-r--r--src/tabs.py2
3 files changed, 14 insertions, 5 deletions
diff --git a/data/default_config.cfg b/data/default_config.cfg
index a2c62206..af1ee6ab 100644
--- a/data/default_config.cfg
+++ b/data/default_config.cfg
@@ -85,10 +85,14 @@ use_bookmarks_method =
use_remote_bookmarks = true
-# what will be put after the name, when using autocompletion
-# a SPACE will always be added after that
+# What will be put after the name, when using autocompletion at the
+# beginning of the input. A space will always be added after that
after_completion = ,
+# Whether or not to add a space after a completion in the middle of the
+# input (not at the start of it)
+add_space_after_completion = true
+
# The maximum length of the nickname that will be displayed in the
# conversation window.
max_nick_length = 25
diff --git a/doc/en/configure.txt b/doc/en/configure.txt
index 3d067688..7094b792 100644
--- a/doc/en/configure.txt
+++ b/doc/en/configure.txt
@@ -120,8 +120,13 @@ section of this documentation.
*after_completion*:: ,
- what will be put after the name, when using autocompletion
- a SPACE will always be added after that
+ What will be put after the name, when using autocompletion at the
+ beginning of the input. A space will always be added after that
+
+*add_space_after_completion*:: true
+
+ Whether or not to add a space after a completion in the middle of the
+ input (not at the start of it)
*words*:: [empty]
diff --git a/src/tabs.py b/src/tabs.py
index 5e20a75f..41bb511e 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1180,7 +1180,7 @@ class MucTab(ChatTab):
self.input.get_text()[:input_pos] == self.input.last_completion + after):
add_after = after
else:
- add_after = ' '
+ add_after = '' if config.get('add_space_after_completion', 'true') == 'false' else ' '
self.input.auto_completion(word_list, add_after, quotify=False)
empty_after = self.input.get_text() == '' or (self.input.get_text().startswith('/') and not self.input.get_text().startswith('//'))
self.send_composing_chat_state(empty_after)