File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 17
17
{
18
18
"caption" : " File: Copy Absolute Path" ,
19
19
"command" : " side_bar_copy_absolute_path" ,
20
- "args" : { "paths" : [] }
20
+ "args" : { "paths" : [], "trigger" : " palette " }
21
21
},
22
22
{
23
23
"caption" : " File: Duplicate…" ,
39
39
"command" : " edit_settings" ,
40
40
"args" :
41
41
{
42
- "base_file" : " ${packages}/SideBarTools/SideBarTools.sublime-settings" ,
43
- "default" : " // SideBarTools Settings - User\n {\n\t $0\n }\n "
42
+ "base_file" : " ${packages}/SideBarTools/SideBarTools.sublime-settings" ,
43
+ "default" : " // SideBarTools Settings - User\n {\n\t $0\n }\n "
44
44
}
45
45
}
46
46
]
Original file line number Diff line number Diff line change @@ -91,6 +91,13 @@ def description(self):
91
91
92
92
class SideBarCopyAbsolutePathCommand (MultipleFilesMixin , SideBarCommand ):
93
93
94
+ def is_visible (self , paths = [], trigger = "" ):
95
+ # in 4158 ST gets the "copy path" sidebar context entry
96
+ # we want to keep our command palette entry though
97
+ if trigger != 'palette' and int (sublime .version ()) >= 4158 :
98
+ return False
99
+ return super ().is_visible (paths )
100
+
94
101
def run (self , paths = []):
95
102
paths = self .get_paths (paths )
96
103
self .copy_to_clipboard_and_inform ('\n ' .join (paths ))
You can’t perform that action at this time.
0 commit comments