Skip to content

Commit

Permalink
Fix visible_on_platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
math2001 committed Feb 14, 2023
1 parent dce16b5 commit 2525bf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion commands/create_from_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def move_until(view, stop_char, increment, start):


class FmCreateFileFromSelectionCommand(sublime_plugin.TextCommand):

CONTEXT_MAX_LENGTH = 50
MATCH_SOURCE_ATTR = re_comp(r"(src|href) *= *$")
MATCH_JS_REQUIRE = re_comp(r"require\(\s*$")
Expand Down
6 changes: 6 additions & 0 deletions commands/open_in_explorer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
import os

import sublime
from .fmcommand import FmWindowCommand


Expand All @@ -16,3 +17,8 @@ def run(self, paths=None):
"open_dir",
{"dir": dirname, "file": basename},
)

def is_visible(self, visible_on_platforms=None, paths=None):
return super().is_visible() and (
visible_on_platforms is None or sublime.platform() in visible_on_platforms
)

0 comments on commit 2525bf7

Please sign in to comment.