parent
e9f6cae5b5
commit
11de2d98b3
2 changed files with 6 additions and 3 deletions
|
@ -1812,7 +1812,8 @@ class MucTab(ChatTab):
|
|||
word_list.append(user.nick)
|
||||
after = config.getstr('after_completion') + ' '
|
||||
input_pos = self.input.pos
|
||||
if ' ' not in self.input.get_text()[:input_pos] or (
|
||||
text_before = self.input.get_text()[:input_pos]
|
||||
if (' ' not in text_before and '\n' not in text_before) or (
|
||||
self.input.last_completion and self.input.get_text()
|
||||
[:input_pos] == self.input.last_completion + after):
|
||||
add_after = after
|
||||
|
|
|
@ -409,12 +409,14 @@ class Input(Win):
|
|||
Normal completion
|
||||
"""
|
||||
pos = self.pos
|
||||
if pos < len(
|
||||
self.text) and after.endswith(' ') and self.text[pos] == ' ':
|
||||
if pos < len(self.text) and after.endswith(' ') and self.text[pos] in ' \n':
|
||||
after = after[:
|
||||
-1] # remove the last space if we are already on a space
|
||||
if not self.last_completion:
|
||||
space_before_cursor = self.text.rfind(' ', 0, pos)
|
||||
line_before_cursor = self.text.rfind('\n', 0, pos)
|
||||
if line_before_cursor > space_before_cursor:
|
||||
space_before_cursor = line_before_cursor
|
||||
if space_before_cursor != -1:
|
||||
begin = self.text[space_before_cursor + 1:pos]
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue