mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Swap ControlShiftUp & ControlShiftDown escape codes. Fix sandbox example. (#549)
This commit is contained in:
@@ -38,7 +38,7 @@ class FileTable(Widget):
|
|||||||
def get_content_height(self, container: Size, viewport: Size, width: int) -> int:
|
def get_content_height(self, container: Size, viewport: Size, width: int) -> int:
|
||||||
return len(self.filtered_files)
|
return len(self.filtered_files)
|
||||||
|
|
||||||
def render(self, style: Style) -> RenderableType:
|
def render(self) -> RenderableType:
|
||||||
grid = Table.grid()
|
grid = Table.grid()
|
||||||
grid.add_column()
|
grid.add_column()
|
||||||
for file in self.filtered_files:
|
for file in self.filtered_files:
|
||||||
|
|||||||
@@ -230,8 +230,8 @@ ANSI_SEQUENCES_KEYS: Mapping[str, Tuple[Keys, ...]] = {
|
|||||||
"\x1bOc": (Keys.ControlRight,), # rxvt
|
"\x1bOc": (Keys.ControlRight,), # rxvt
|
||||||
"\x1bOd": (Keys.ControlLeft,), # rxvt
|
"\x1bOd": (Keys.ControlLeft,), # rxvt
|
||||||
# Control + shift + arrows.
|
# Control + shift + arrows.
|
||||||
"\x1b[1;6A": (Keys.ControlShiftDown,),
|
"\x1b[1;6A": (Keys.ControlShiftUp,),
|
||||||
"\x1b[1;6B": (Keys.ControlShiftUp,),
|
"\x1b[1;6B": (Keys.ControlShiftDown,),
|
||||||
"\x1b[1;6C": (Keys.ControlShiftRight,),
|
"\x1b[1;6C": (Keys.ControlShiftRight,),
|
||||||
"\x1b[1;6D": (Keys.ControlShiftLeft,),
|
"\x1b[1;6D": (Keys.ControlShiftLeft,),
|
||||||
"\x1b[1;6F": (Keys.ControlShiftEnd,),
|
"\x1b[1;6F": (Keys.ControlShiftEnd,),
|
||||||
|
|||||||
Reference in New Issue
Block a user