Skip to content
This repository was archived by the owner on May 6, 2023. It is now read-only.

Commit cb013af

Browse files
author
Eric Hamiter
committed
If webbrowser is just being used to open a page, we can remove the import and do it another way to save some resources.
1 parent 1a959b7 commit cb013af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

useIt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import sublime
22
import sublime_plugin
3-
import webbrowser
43
import re
54

65

@@ -26,4 +25,5 @@ def run(self, edit):
2625
re_search = CLEAN_CSS_PATTERN.search(search)
2726
if re_search:
2827
search = re_search.group()
29-
webbrowser.open_new_tab(BASE_URL + search)
28+
self.view.window().run_command('open_url', \
29+
{"url": BASE_URL + search})

0 commit comments

Comments
 (0)