File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change 1111
1212
1313def SearchFor (text ):
14- url = 'http://unbug.github.io/codelf/#= ' + text .replace (' ' , '%20' )
14+ url = 'http://unbug.github.io/codelf/#' + text .replace (' ' , '%20' )
1515 webbrowser .open_new_tab (url )
1616
1717
18- class CodelfSelectionCommand (sublime_plugin .TextCommand ):
19- def run (self , edit ):
20- for selection in self .view .sel ():
21- # if the user didn't select anything, search the currently highlighted word
22- if selection .empty ():
23- text = self .view .word (selection )
24-
25- text = self .view .substr (selection )
26- SearchFor (text )
27-
28-
2918class CodelfFromInputCommand (sublime_plugin .WindowCommand ):
3019 def run (self ):
3120 # Get the search item
@@ -40,3 +29,15 @@ def on_change(self, input):
4029
4130 def on_cancel (self ):
4231 pass
32+
33+
34+ class CodelfSelectionCommand (sublime_plugin .TextCommand ):
35+ def run (self , edit ):
36+ for selection in self .view .sel ():
37+ # if the user didn't select anything, search the currently highlighted word
38+ if selection .empty ():
39+ text = self .view .word (selection )
40+
41+ text = self .view .substr (selection )
42+ SearchFor (text )
43+
You can’t perform that action at this time.
0 commit comments