Commit 244dbf3a authored by mathieui's avatar mathieui

fix: pasting text in data forms and bookmarkstab

Fix #3519
parent f915e9a3
Pipeline #3898 passed with stages
in 7 minutes and 16 seconds
......@@ -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
......
......@@ -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
......
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment