summaryrefslogtreecommitdiff
path: root/poezio/tabs/muctab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-16 21:44:02 +0200
committermathieui <mathieui@mathieui.net>2021-04-16 21:52:28 +0200
commit11de2d98b3a734ffcd4641a7c5b7affeb47844f6 (patch)
tree3bb8e3f6c5d249b9802dcf08365ab1cea83fa5b9 /poezio/tabs/muctab.py
parente9f6cae5b5d836ff4ccff30d5034d2bf2c0f1271 (diff)
downloadpoezio-11de2d98b3a734ffcd4641a7c5b7affeb47844f6.tar.gz
poezio-11de2d98b3a734ffcd4641a7c5b7affeb47844f6.tar.bz2
poezio-11de2d98b3a734ffcd4641a7c5b7affeb47844f6.tar.xz
poezio-11de2d98b3a734ffcd4641a7c5b7affeb47844f6.zip
fix: take newlines into account when completing stuff
fixes #3385
Diffstat (limited to 'poezio/tabs/muctab.py')
-rw-r--r--poezio/tabs/muctab.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 31ca7884..5cde8f68 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -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