summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/commands.rst2
-rw-r--r--doc/source/keys.rst4
-rw-r--r--poezio/config.py2
-rw-r--r--poezio/core/commands.py6
-rw-r--r--poezio/tabs/conversationtab.py2
-rw-r--r--poezio/tabs/muctab.py2
-rw-r--r--poezio/tabs/privatetab.py2
-rw-r--r--poezio/windows/text_win.py4
8 files changed, 16 insertions, 8 deletions
diff --git a/doc/source/commands.rst b/doc/source/commands.rst
index 3f3bb475..87d72198 100644
--- a/doc/source/commands.rst
+++ b/doc/source/commands.rst
@@ -223,7 +223,7 @@ These commands work in *any* tab.
Invite specified JIDs into a newly created room.
- .. versionadded:: 0.13
+ .. versionadded:: 0.13
/activity
**Usage:** ``/activity [<general> [specific] [comment]]``
diff --git a/doc/source/keys.rst b/doc/source/keys.rst
index ae641c26..dc5fa35b 100644
--- a/doc/source/keys.rst
+++ b/doc/source/keys.rst
@@ -1,7 +1,7 @@
.. _keys-page:
-Keys
-====
+Keyboard Shortcuts
+==================
This file describes the default keys of poezio and explains how to
configure them.
diff --git a/poezio/config.py b/poezio/config.py
index 89b75d94..c87f881a 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -447,7 +447,7 @@ class Config(RawConfigParser):
RawConfigParser.set(self, section, option, value)
if not self.write_in_file(section, option, value):
return ('Unable to write in the config file', 'Error')
- if 'password' in option and 'eval_password' not in option:
+ if isinstance(option, str) and 'password' in option and 'eval_password' not in option:
value = '********'
return ("%s=%s" % (option, value), 'Info')
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index 34ac96b3..cc2869a0 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -614,7 +614,8 @@ class CommandCore:
theme.COLOR_INFORMATION_TEXT),
})
for option_name, option_value in section.items():
- if 'password' in option_name and 'eval_password' not in option_name:
+ if isinstance(option_name, str) and \
+ 'password' in option_name and 'eval_password' not in option_name:
option_value = '********'
lines.append(
'%s\x19%s}=\x19o%s' %
@@ -624,7 +625,8 @@ class CommandCore:
elif len(args) == 1:
option = args[0]
value = config.get(option)
- if 'password' in option and 'eval_password' not in option and value is not None:
+ if isinstance(option, str) and \
+ 'password' in option and 'eval_password' not in option and value is not None:
value = '********'
if value is None and '=' in option:
args = option.split('=', 1)
diff --git a/poezio/tabs/conversationtab.py b/poezio/tabs/conversationtab.py
index d1ad608c..6ce5c72c 100644
--- a/poezio/tabs/conversationtab.py
+++ b/poezio/tabs/conversationtab.py
@@ -89,6 +89,7 @@ class ConversationTab(OneToOneTab):
raise NotImplementedError
@staticmethod
+ @refresh_wrapper.always
def add_information_element(plugin_name, callback):
"""
Lets a plugin add its own information to the ConversationInfoWin
@@ -96,6 +97,7 @@ class ConversationTab(OneToOneTab):
ConversationTab.additional_information[plugin_name] = callback
@staticmethod
+ @refresh_wrapper.always
def remove_information_element(plugin_name):
del ConversationTab.additional_information[plugin_name]
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 17abb369..1c752fa9 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -109,6 +109,7 @@ class MucTab(ChatTab):
return None
@staticmethod
+ @refresh_wrapper.always
def add_information_element(plugin_name: str, callback: Callable[[str], str]) -> None:
"""
Lets a plugin add its own information to the MucInfoWin
@@ -116,6 +117,7 @@ class MucTab(ChatTab):
MucTab.additional_information[plugin_name] = callback
@staticmethod
+ @refresh_wrapper.always
def remove_information_element(plugin_name: str) -> None:
"""
Lets a plugin add its own information to the MucInfoWin
diff --git a/poezio/tabs/privatetab.py b/poezio/tabs/privatetab.py
index cec68ac5..a1b9a87a 100644
--- a/poezio/tabs/privatetab.py
+++ b/poezio/tabs/privatetab.py
@@ -94,6 +94,7 @@ class PrivateTab(OneToOneTab):
super().ack_message(msg_id, msg_jid)
@staticmethod
+ @refresh_wrapper.always
def add_information_element(plugin_name, callback):
"""
Lets a plugin add its own information to the PrivateInfoWin
@@ -101,6 +102,7 @@ class PrivateTab(OneToOneTab):
PrivateTab.additional_information[plugin_name] = callback
@staticmethod
+ @refresh_wrapper.always
def remove_information_element(plugin_name):
del PrivateTab.additional_information[plugin_name]
diff --git a/poezio/windows/text_win.py b/poezio/windows/text_win.py
index 1de905ea..96161d51 100644
--- a/poezio/windows/text_win.py
+++ b/poezio/windows/text_win.py
@@ -267,8 +267,8 @@ class TextWin(BaseTextWin):
def scroll_to_separator(self) -> None:
"""
- Scroll until separator is centered. If no separator is
- present, scroll at the top of the window
+ Scroll to the first message after the separator. If no
+ separator is present, scroll to the first message of the window
"""
if None in self.built_lines:
self.pos = len(self.built_lines) - self.built_lines.index(