Marking now works

This commit is contained in:
Kovid Goyal
2020-01-12 19:29:55 +05:30
parent 3d307794be
commit d63ea11cac
2 changed files with 11 additions and 4 deletions

View File

@@ -4,6 +4,7 @@
from . import BaseTest
from kitty.fast_data_types import DECAWM, IRM, Cursor, DECCOLM, DECOM
from kitty.marks import marker_from_regex
class TestScreen(BaseTest):
@@ -453,3 +454,9 @@ class TestScreen(BaseTest):
self.ae(as_text(), 'ababababab\nc\n\n')
self.ae(as_text(True), 'ababababab\nc\n\n')
def test_user_marking(self):
s = self.create_screen()
s.draw('abaa')
s.add_marker('a', marker_from_regex('a', 3))
self.ae(s.marked_cells(), [(0, 0, 3), (2, 0, 3), (3, 0, 3)])