Add a add_space_after_completion bool option.

fix #2150
This commit is contained in:
Florent Le Coz 2012-11-06 18:02:31 +00:00
parent 356211699d
commit 7f7ec57f40
3 changed files with 14 additions and 5 deletions

View file

@ -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

View file

@ -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]

View file

@ -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)