vimperator / vimperator-labs

Vimperator
http://vimperator.org
Other
1.19k stars 196 forks source link

Unable to recognize magnet link #454

Open xuhdev opened 8 years ago

xuhdev commented 8 years ago

Opening a magnet link automatically jumps to searching the link on the default search engine. Maybe this is a more general issue: links with a default application association should not be searched.

timss commented 8 years ago

This does not sound Vimperator specific. What happens without Vimperator?

Do you have anything for magnet links in about:preferences#applications?

gkatsev commented 8 years ago

How are you opening the link? We generally just let firefox handle everything so I doubt it's anything vimperator specific.

xuhdev commented 8 years ago

I used the open command. If I typed it in the navigation bar in Firefox, Firefox launched the associated application to open the link.

timss commented 8 years ago

open seems to use loadURIWithFlags, not sure why it would be any different.

xuhdev commented 8 years ago

I think . might be the reason. If a magnet link contains a dot, then the associated application is launched. If the link does not contain a dot, then the link is treated as a search string.

xuhdev commented 8 years ago

Shall we fix this? I think the situation is pretty clear now.

timss commented 8 years ago

@xuhdev Unfortunately we're a bit short on manpower. Pull requests are most welcome, if you'd like to give it a shot yourself. Thanks.

xuhdev commented 8 years ago

@timss I can make a PR, if you can point out the location in the code where whether a string is a URL or a search keyword is detected. Thanks!

timss commented 8 years ago

Not quite sure how that part works, if completions are relevant or not etc.

Maybe you can point him in the right direction, @gkatsev ?