summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-16 20:11:13 +0200
committermathieui <mathieui@mathieui.net>2021-04-16 20:20:15 +0200
commit244dbf3a22383be07571f89c680b1aae1253c9a0 (patch)
tree6b1122e04a549fd677b47f2df6054b86cee78602
parentf915e9a3ab082e19f6a87c3b00ac0b7a65ca7abd (diff)
downloadpoezio-244dbf3a22383be07571f89c680b1aae1253c9a0.tar.gz
poezio-244dbf3a22383be07571f89c680b1aae1253c9a0.tar.bz2
poezio-244dbf3a22383be07571f89c680b1aae1253c9a0.tar.xz
poezio-244dbf3a22383be07571f89c680b1aae1253c9a0.zip
fix: pasting text in data forms and bookmarkstab
Fix #3519
-rw-r--r--poezio/tabs/bookmarkstab.py2
-rw-r--r--poezio/windows/bookmark_forms.py8
-rw-r--r--poezio/windows/data_forms.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/poezio/tabs/bookmarkstab.py b/poezio/tabs/bookmarkstab.py
index 31902fa6..10c7c0ce 100644
--- a/poezio/tabs/bookmarkstab.py
+++ b/poezio/tabs/bookmarkstab.py
@@ -116,7 +116,7 @@ class BookmarksTab(Tab):
return res
self.bookmarks_win.refresh_current_input()
else:
- self.bookmarks_win.on_input(key)
+ self.bookmarks_win.on_input(key, raw=raw)
def resize(self):
self.need_resize = False
diff --git a/poezio/windows/bookmark_forms.py b/poezio/windows/bookmark_forms.py
index fb8ad589..a7d004d8 100644
--- a/poezio/windows/bookmark_forms.py
+++ b/poezio/windows/bookmark_forms.py
@@ -62,7 +62,7 @@ class BookmarkMethodInput(FieldInputMixin):
# val_pos is the position of the currently selected option
self.val_pos = self.options.index(field.method)
- def do_command(self, key: str) -> None:
+ def do_command(self, key: str, raw: bool = False) -> None:
if key == 'KEY_LEFT':
if self.val_pos > 0:
self.val_pos -= 1
@@ -131,7 +131,7 @@ class BookmarkAutojoinWin(FieldInputMixin):
self.last_key = 'KEY_RIGHT'
self.value = field.autojoin
- def do_command(self, key: str) -> None:
+ def do_command(self, key: str, raw: bool = False) -> None:
if key == 'KEY_LEFT' or key == 'KEY_RIGHT':
self.value = not self.value
self.last_key = key
@@ -341,11 +341,11 @@ class BookmarksWin(Win):
self.current_horizontal_input].set_color(
theme.COLOR_SELECTED_ROW)
- def on_input(self, key: str) -> None:
+ def on_input(self, key: str, raw: bool = False) -> None:
if not self.lines:
return
self.lines[self.current_input][
- self.current_horizontal_input].do_command(key)
+ self.current_horizontal_input].do_command(key, raw=raw)
def refresh(self) -> None:
# store the cursor status
diff --git a/poezio/windows/data_forms.py b/poezio/windows/data_forms.py
index 7e746774..bdc6cfe1 100644
--- a/poezio/windows/data_forms.py
+++ b/poezio/windows/data_forms.py
@@ -189,7 +189,7 @@ class TextMultiWin(FieldInputMixin):
if not self.options or self.options[-1] != '':
self.options.append('')
else:
- self.edition_input.do_command(key)
+ self.edition_input.do_command(key, raw=raw)
self.refresh()
def refresh(self):