Skip to content

Commit 5646b63

Browse files
committed
buf fixed
1 parent b7641ee commit 5646b63

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

Mdnsearch.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,10 @@
1111

1212

1313
def 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-
2918
class 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+

0 commit comments

Comments
 (0)