mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Refactor screen mode API to use get/setters
This commit is contained in:
@@ -30,9 +30,13 @@ class Callbacks:
|
||||
def request_capabilities(self, q):
|
||||
self.qbuf += q
|
||||
|
||||
def buf_toggled(self, is_alt):
|
||||
self.is_alt = is_alt
|
||||
|
||||
def clear(self):
|
||||
self.wtcbuf = b''
|
||||
self.iconbuf = self.titlebuf = self.colorbuf = self.qbuf = self.ctbuf = ''
|
||||
self.is_alt = False
|
||||
|
||||
|
||||
def filled_line_buf(ynum=5, xnum=5, cursor=Cursor()):
|
||||
|
||||
@@ -332,3 +332,10 @@ class TestScreen(BaseTest):
|
||||
c = s.line(1).cursor_from(0)
|
||||
self.ae(c.fg, (5 << 8) | 1)
|
||||
self.ae(c.bg, 0)
|
||||
|
||||
def test_cursor_hidden(self):
|
||||
s = self.create_screen()
|
||||
s.toggle_alt_screen()
|
||||
s.cursor_visible = False
|
||||
s.toggle_alt_screen()
|
||||
self.assertFalse(s.cursor_visible)
|
||||
|
||||
Reference in New Issue
Block a user