lanoxx / tilda

A Gtk based drop down terminal for Linux and Unix
GNU General Public License v2.0
1.27k stars 162 forks source link

Url-parsing cuts on exclamation mark #391

Closed demlak closed 4 years ago

demlak commented 5 years ago

Hi, i'm using tilda 1.4.1 on my arch-linux and when there are urls detected, those are cut at exclamation marks

for example https://example.com/top/!%20s%3A1000/3255330 is detected as https://example.com/top/ for clicking on it.

demlak commented 4 years ago

Is this based on tilda or is it based on underlaying terminal?

lanoxx commented 4 years ago

Tilda has the word_chars option which can be set via Title and Command, unfortunately it seems that adding the exclamation mark to the word_chars has no effect. This might be an issue in the regex handling in VTE (maybe @egmontkob knows more). Some time in the future Tilda will switch to the new PCRE2 based regex handling in VTE which might fix this.

I have added pull request https://github.com/lanoxx/tilda/pull/399 for this but because Ubuntu 18.04 does not support this I have not yet merged this. If you are running on a newer distribution you could try to build from source to see if that fixes the issue.

egmontkob commented 4 years ago

word_char_exceptions is used for selecting text when double clicking.

Regexes are used for auto-detecting URLs (or anything), underlining them on mouseover and easily triggering custom actions.

These two have nothing to do with each other. URL detection needs a waaaaaaay more complex engine than just stopping at a certain set of characters.

lanoxx commented 4 years ago

@egmontkob Thanks for the hint, I got confused about the two. I have added the '!' to the HTTP_REGEX property so URLs with a '!' are now correctly recognized.