diff options
author | Florent Le Coz <louiz@louiz.org> | 2012-11-06 18:02:31 +0000 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2012-11-06 18:02:31 +0000 |
commit | 7f7ec57f40ed2fb41795d52e03aed8eacc3a2f34 (patch) | |
tree | f28d34acb0718d203ad90f3488e51ca1e9b84d8a | |
parent | 356211699df62272e85510eff3115a483a1ceca2 (diff) | |
download | poezio-7f7ec57f40ed2fb41795d52e03aed8eacc3a2f34.tar.gz poezio-7f7ec57f40ed2fb41795d52e03aed8eacc3a2f34.tar.bz2 poezio-7f7ec57f40ed2fb41795d52e03aed8eacc3a2f34.tar.xz poezio-7f7ec57f40ed2fb41795d52e03aed8eacc3a2f34.zip |
Add a add_space_after_completion bool option.
fix #2150
-rw-r--r-- | data/default_config.cfg | 8 | ||||
-rw-r--r-- | doc/en/configure.txt | 9 | ||||
-rw-r--r-- | src/tabs.py | 2 |
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) |