Make the set of URL prefixes that are recognized while hovering with the mouse configurable

Fixes #2416
This commit is contained in:
Kovid Goyal
2020-03-08 13:16:34 +05:30
parent cc1336a616
commit 645890ccc8
7 changed files with 72 additions and 18 deletions

View File

@@ -74,12 +74,15 @@ class BaseTest(TestCase):
ae = TestCase.assertEqual
maxDiff = 2000
def create_screen(self, cols=5, lines=5, scrollback=5, cell_width=10, cell_height=20, options=None):
def set_options(self, options=None):
final_options = {'scrollback_pager_history_size': 1024, 'click_interval': 0.5}
if options:
final_options.update(options)
options = Options(merge_configs(defaults._asdict(), final_options))
set_options(options)
def create_screen(self, cols=5, lines=5, scrollback=5, cell_width=10, cell_height=20, options=None):
self.set_options(options)
c = Callbacks()
return Screen(c, lines, cols, scrollback, cell_width, cell_height, 0, c)

View File

@@ -232,6 +232,8 @@ class TestDataTypes(BaseTest):
self.assertEqualAttributes(l3.cursor_from(0), q)
def test_url_at(self):
self.set_options()
def create(t):
lb = create.lb = LineBuf(1, len(t))
lf = lb.line(0)