Skip to content

Commit 40c4523

Browse files
committed
Fix visible_on_platforms
1 parent dce16b5 commit 40c4523

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

commands/create_from_selection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def move_until(view, stop_char, increment, start):
2525

2626

2727
class FmCreateFileFromSelectionCommand(sublime_plugin.TextCommand):
28-
2928
CONTEXT_MAX_LENGTH = 50
3029
MATCH_SOURCE_ATTR = re_comp(r"(src|href) *= *$")
3130
MATCH_JS_REQUIRE = re_comp(r"require\(\s*$")

commands/open_in_explorer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- encoding: utf-8 -*-
22
import os
33

4+
import sublime
45
from .fmcommand import FmWindowCommand
56

67

@@ -16,3 +17,8 @@ def run(self, paths=None):
1617
"open_dir",
1718
{"dir": dirname, "file": basename},
1819
)
20+
21+
def is_visible(self, visible_on_platforms=None, paths=None):
22+
return super().is_visible() and (
23+
visible_on_platforms is None or sublime.platform() in visible_on_platforms
24+
)

libs/input_for_path.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def StdClass(name="Unknown"):
2323

2424

2525
class InputForPath(object):
26-
2726
STATUS_KEY = "input_for_path"
2827

2928
def __init__(
@@ -44,7 +43,6 @@ def __init__(
4443
no_browser_action=False,
4544
browser_index=None,
4645
):
47-
4846
self.user_on_done = on_done
4947
self.user_on_change = on_change
5048
self.user_on_cancel = on_cancel
@@ -102,7 +100,6 @@ def __init__(
102100
self.create_input()
103101

104102
def create_input(self):
105-
106103
self.prev_input_path = None
107104

108105
self.input = StdClass("input")
@@ -183,7 +180,6 @@ def sort_in_two_list(items, key):
183180
return prefix, folders
184181

185182
def input_on_change(self, input_path):
186-
187183
self.input_path = user_friendly(input_path)
188184

189185
self.input_path = transform_aliases(self.window, self.input_path)
@@ -262,7 +258,6 @@ def replace_with_completion(completions, index, prefix=None):
262258
if not text.endswith(tuple(completions)):
263259
return reset_settings()
264260
if "\t" in input_path:
265-
266261
# there is still some completions available
267262
if len(completions) - 1 > index:
268263
return replace_with_completion(completions, index)

libs/sublimefunctions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ def has_unescaped_dollar(string):
123123
"over and over again."
124124
)
125125
if get_settings().get("open_help_on_alias_infinite_loop", True) is True:
126-
127126
sublime.run_command(
128127
"open_url",
129128
{

0 commit comments

Comments
 (0)