mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Grid editor refinements.
- Correct column width calculation used in keystrokes. Arrow keys should now work as expected in multi-line fields. - Enable multi-line editing throughout. You now need to tab or esc to exit edit mode.
This commit is contained in:
parent
0de97ad9e0
commit
50630d62fd
@ -95,7 +95,8 @@ class GridItem(common.WWrap):
|
||||
|
||||
def keypress(self, s, k):
|
||||
if self.editing:
|
||||
k = self.editing.keypress((s[0]-self.first_width-4,), k)
|
||||
w = self.w.column_widths(s)[self.focused]
|
||||
k = self.editing.keypress((w,), k)
|
||||
return k
|
||||
|
||||
def selectable(self):
|
||||
@ -253,7 +254,7 @@ class GridEditor(common.WWrap):
|
||||
|
||||
def keypress(self, size, key):
|
||||
if self.walker.editing:
|
||||
if key in ["esc", "enter"]:
|
||||
if key in ["esc"]:
|
||||
self.walker.stop_edit()
|
||||
elif key == "tab":
|
||||
pf, pfc = self.walker.focus, self.walker.focus_col
|
||||
|
Loading…
Reference in New Issue
Block a user