mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-12 19:49:32 +02:00
Fix marking of text not working on lines that contain zero cells
Zero cells are passed to the regex engine as spaces, so they must increment the match_pos counter. Fixes #3403
This commit is contained in:
@@ -647,6 +647,13 @@ class TestScreen(BaseTest):
|
||||
self.ae(s.marked_cells(), cells(8))
|
||||
s.set_marker(marker_from_regex('\t', 3))
|
||||
self.ae(s.marked_cells(), cells(*range(8)))
|
||||
s = self.create_screen()
|
||||
s.cursor.x = 2
|
||||
s.draw('x')
|
||||
s.cursor.x += 1
|
||||
s.draw('x')
|
||||
s.set_marker(marker_from_function(mark_x))
|
||||
self.ae(s.marked_cells(), [(2, 0, 1), (4, 0, 2)])
|
||||
|
||||
def test_hyperlinks(self):
|
||||
s = self.create_screen()
|
||||
|
||||
Reference in New Issue
Block a user