Removed unused junk from the terminfo file
This commit is contained in:
parent
b8df0e3382
commit
86789c5d84
@ -86,6 +86,15 @@ class Screen(QObject):
|
|||||||
def display(self) -> Sequence[str]:
|
def display(self) -> Sequence[str]:
|
||||||
return tuple(map(str, self.linebuf))
|
return tuple(map(str, self.linebuf))
|
||||||
|
|
||||||
|
def toggle_screen_buffer(self):
|
||||||
|
self.save_cursor()
|
||||||
|
if self.linebuf is self.main_linebuf:
|
||||||
|
self.linebuf, self.savepoints = self.alt_linebuf, self.alt_savepoints
|
||||||
|
else:
|
||||||
|
self.linebuf, self.savepoints = self.main_linebuf, self.main_savepoints
|
||||||
|
self.restore_cursor()
|
||||||
|
self.update_screen()
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
"""Resets the terminal to its initial state.
|
"""Resets the terminal to its initial state.
|
||||||
|
|
||||||
@ -102,6 +111,8 @@ class Screen(QObject):
|
|||||||
and tabstops should be reset as well, thanks to
|
and tabstops should be reset as well, thanks to
|
||||||
:manpage:`xterm` -- we now know that.
|
:manpage:`xterm` -- we now know that.
|
||||||
"""
|
"""
|
||||||
|
if self.linebuf is self.alt_linebuf:
|
||||||
|
self.toggle_screen_buffer()
|
||||||
self.linebuf.clear()
|
self.linebuf.clear()
|
||||||
self.linebuf[:] = (Line(self.columns) for i in range(self.lines))
|
self.linebuf[:] = (Line(self.columns) for i in range(self.lines))
|
||||||
self.mode = {mo.DECAWM, mo.DECTCEM}
|
self.mode = {mo.DECAWM, mo.DECTCEM}
|
||||||
@ -117,10 +128,12 @@ class Screen(QObject):
|
|||||||
# set every `n` spaces when the terminal is powered up. Since
|
# set every `n` spaces when the terminal is powered up. Since
|
||||||
# we aim to support VT102 / VT220 and linux -- we use n = 8.
|
# we aim to support VT102 / VT220 and linux -- we use n = 8.
|
||||||
self.tabstops = set(range(7, self.columns, 8))
|
self.tabstops = set(range(7, self.columns, 8))
|
||||||
|
self.normal_keypad_mode()
|
||||||
|
|
||||||
self.cursor = Cursor(0, 0)
|
self.cursor = Cursor(0, 0)
|
||||||
self.cursor_changed(self.cursor)
|
self.cursor_changed(self.cursor)
|
||||||
self.cursor_position()
|
self.cursor_position()
|
||||||
|
self.update_screen()
|
||||||
|
|
||||||
def resize(self, lines: int, columns: int):
|
def resize(self, lines: int, columns: int):
|
||||||
"""Resize the screen to the given dimensions.
|
"""Resize the screen to the given dimensions.
|
||||||
@ -225,10 +238,7 @@ class Screen(QObject):
|
|||||||
self.cursor_changed(self.cursor)
|
self.cursor_changed(self.cursor)
|
||||||
|
|
||||||
if mo.ALTERNATE_SCREEN in self.mode and self.linebuf is self.main_linebuf:
|
if mo.ALTERNATE_SCREEN in self.mode and self.linebuf is self.main_linebuf:
|
||||||
self.save_cursor()
|
self.toggle_screen_buffer()
|
||||||
self.linebuf, self.savepoints = self.alt_linebuf, self.alt_savepoints
|
|
||||||
self.restore_cursor()
|
|
||||||
self.update_screen()
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def in_bracketed_paste_mode(self):
|
def in_bracketed_paste_mode(self):
|
||||||
@ -274,10 +284,7 @@ class Screen(QObject):
|
|||||||
self.cursor_changed(self.cursor)
|
self.cursor_changed(self.cursor)
|
||||||
|
|
||||||
if mo.ALTERNATE_SCREEN not in self.mode and self.linebuf is not self.main_linebuf:
|
if mo.ALTERNATE_SCREEN not in self.mode and self.linebuf is not self.main_linebuf:
|
||||||
self.save_cursor()
|
self.toggle_screen_buffer()
|
||||||
self.linebuf, self.savepoints = self.main_linebuf, self.main_savepoints
|
|
||||||
self.restore_cursor()
|
|
||||||
self.update_screen()
|
|
||||||
|
|
||||||
def define_charset(self, code, mode):
|
def define_charset(self, code, mode):
|
||||||
"""Defines ``G0`` or ``G1`` charset.
|
"""Defines ``G0`` or ``G1`` charset.
|
||||||
@ -975,10 +982,10 @@ class Screen(QObject):
|
|||||||
else: # DECLL
|
else: # DECLL
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def numeric_keypad_mode(self):
|
def normal_keypad_mode(self):
|
||||||
pass # TODO: Implement this
|
pass # TODO: Implement this
|
||||||
|
|
||||||
def application_keypad_mode(self):
|
def alternate_keypad_mode(self):
|
||||||
pass # TODO: Implement this
|
pass # TODO: Implement this
|
||||||
|
|
||||||
def debug(self, *args, **kwargs):
|
def debug(self, *args, **kwargs):
|
||||||
|
|||||||
@ -39,10 +39,10 @@ DECSC = b"7"
|
|||||||
#: selection. If none were saved, move cursor to home position.
|
#: selection. If none were saved, move cursor to home position.
|
||||||
DECRC = b"8"
|
DECRC = b"8"
|
||||||
|
|
||||||
#: Set numeric keypad mode
|
#: Set normal keypad mode
|
||||||
DECPNM = b'>'
|
DECPNM = b'>'
|
||||||
|
|
||||||
#: Set application keypad mode
|
#: Set alternate keypad mode
|
||||||
DECPAM = b'='
|
DECPAM = b'='
|
||||||
|
|
||||||
# "Sharp" escape sequences.
|
# "Sharp" escape sequences.
|
||||||
|
|||||||
@ -82,8 +82,8 @@ class Stream(object):
|
|||||||
esc.HTS: "set_tab_stop",
|
esc.HTS: "set_tab_stop",
|
||||||
esc.DECSC: "save_cursor",
|
esc.DECSC: "save_cursor",
|
||||||
esc.DECRC: "restore_cursor",
|
esc.DECRC: "restore_cursor",
|
||||||
esc.DECPNM: 'numeric_keypad_mode',
|
esc.DECPNM: 'normal_keypad_mode',
|
||||||
esc.DECPAM: 'application_keypad_mode',
|
esc.DECPAM: 'alternate_keypad_mode',
|
||||||
}
|
}
|
||||||
|
|
||||||
#: "sharp" escape sequences -- ``ESC # <N>``.
|
#: "sharp" escape sequences -- ``ESC # <N>``.
|
||||||
|
|||||||
@ -53,7 +53,6 @@ xterm-kitty|KovIdTTY,
|
|||||||
indn=\E[%p1%dS,
|
indn=\E[%p1%dS,
|
||||||
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
|
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
|
||||||
invis=\E[8m,
|
invis=\E[8m,
|
||||||
is2=\E[!p\E[?3;4l\E[4l\E>,
|
|
||||||
kbs=\177,
|
kbs=\177,
|
||||||
kcub1=\EOD,
|
kcub1=\EOD,
|
||||||
kcud1=\EOB,
|
kcud1=\EOB,
|
||||||
@ -93,12 +92,10 @@ xterm-kitty|KovIdTTY,
|
|||||||
rmam=\E[?7l,
|
rmam=\E[?7l,
|
||||||
rmcup=\E[?1049l,
|
rmcup=\E[?1049l,
|
||||||
rmir=\E[4l,
|
rmir=\E[4l,
|
||||||
rmkx=\E[?1l\E>,
|
|
||||||
rmm=\E[?1034l,
|
rmm=\E[?1034l,
|
||||||
rmso=\E[27m,
|
rmso=\E[27m,
|
||||||
rmul=\E[24m,
|
rmul=\E[24m,
|
||||||
rs1=\Ec,
|
rs1=\Ec,
|
||||||
rs2=\E[!p\E[?3;4l\E[4l\E>,
|
|
||||||
sc=\E7,
|
sc=\E7,
|
||||||
setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
|
setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
|
||||||
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
|
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
|
||||||
@ -108,7 +105,6 @@ xterm-kitty|KovIdTTY,
|
|||||||
smam=\E[?7h,
|
smam=\E[?7h,
|
||||||
smcup=\E[?1049h,
|
smcup=\E[?1049h,
|
||||||
smir=\E[4h,
|
smir=\E[4h,
|
||||||
smkx=\E[?1h\E=,
|
|
||||||
smm=\E[?1034h,
|
smm=\E[?1034h,
|
||||||
smso=\E[7m,
|
smso=\E[7m,
|
||||||
smul=\E[4m,
|
smul=\E[4m,
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user