Fix hover detection of URLs not working when hovering over the first colon and slash characters in short URLs

Fixes #1201
This commit is contained in:
Kovid Goyal
2018-12-04 06:52:26 +05:30
parent d5366a421f
commit 47ec372c30
3 changed files with 13 additions and 0 deletions

View File

@@ -242,6 +242,9 @@ class TestDataTypes(BaseTest):
self.ae(l0.url_end_at(0), len(l0) - 1)
l2 = create("http://-abcd] ")
self.ae(l2.url_end_at(0), len(l2) - 3)
l3 = create("http://ab.de ")
self.ae(l3.url_start_at(4), 0)
self.ae(l3.url_start_at(5), 0)
def lspace_test(n, scheme='http'):
lf = create(' ' * n + scheme + '://acme.com')