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 40c4523
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
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
)
5 changes: 0 additions & 5 deletions libs/input_for_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def StdClass(name="Unknown"):


class InputForPath(object):

STATUS_KEY = "input_for_path"

def __init__(
Expand All @@ -44,7 +43,6 @@ def __init__(
no_browser_action=False,
browser_index=None,
):

self.user_on_done = on_done
self.user_on_change = on_change
self.user_on_cancel = on_cancel
Expand Down Expand Up @@ -102,7 +100,6 @@ def __init__(
self.create_input()

def create_input(self):

self.prev_input_path = None

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

def input_on_change(self, input_path):

self.input_path = user_friendly(input_path)

self.input_path = transform_aliases(self.window, self.input_path)
Expand Down Expand Up @@ -262,7 +258,6 @@ def replace_with_completion(completions, index, prefix=None):
if not text.endswith(tuple(completions)):
return reset_settings()
if "\t" in input_path:

# there is still some completions available
if len(completions) - 1 > index:
return replace_with_completion(completions, index)
Expand Down
1 change: 0 additions & 1 deletion libs/sublimefunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ def has_unescaped_dollar(string):
"over and over again."
)
if get_settings().get("open_help_on_alias_infinite_loop", True) is True:

sublime.run_command(
"open_url",
{
Expand Down

0 comments on commit 40c4523

Please sign in to comment.