Make browser open on Windows when running in cygwin

Cygwin doesn't have xdg-utils so running "xdg-open"
doesn't do anything at all, not even an error gets logged.

This patch makes sure "cygstart" is also called when opening a
a URL, which is enough on Cygwin for launching the browser.

Change-Id: Ia46d3ad43f91bc2bde1c5b95529d2324d090b405
This commit is contained in:
Igor D.C 2019-07-17 00:27:57 -07:00 committed by Igor D.C.
parent f49f27db59
commit 461ae708a4
1 changed files with 2 additions and 0 deletions

View File

@ -286,6 +286,8 @@ class App(object):
self.ring = mywid.KillRing()
self.input_buffer = []
webbrowser.register('xdg-open', None, BackgroundBrowser("xdg-open"))
# Open the browser on Windows when running in cygwin:
webbrowser.register('cygstart', None, BackgroundBrowser("cygstart"))
self.fetch_missing_refs = fetch_missing_refs
self.config.keymap.updateCommandMap()