Skip to content

Commit

Permalink
fix copy filename from sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Jul 25, 2024
1 parent 3e38f62 commit 7d198c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SideBar.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def is_visible(self, paths=[], context=""):
return len(paths) < 2
return bool(self.window.active_view().file_name())

def copy_to_clipboard_and_inform(self, paths):
def copy_to_clipboard_and_inform(self, paths=[]):
sublime.set_clipboard('\n'.join(paths))

lines = len(paths)
Expand Down Expand Up @@ -90,7 +90,7 @@ def is_visible(self, paths=[]):
class SideBarCopyNameCommand(MultipleFilesMixin, SideBarCommand):

def run(self, paths=[], context=""):
names = (os.path.split(path)[1] for path in self.get_paths(paths))
names = [os.path.split(path)[1] for path in self.get_paths(paths)]
self.copy_to_clipboard_and_inform(names)


Expand Down

0 comments on commit 7d198c1

Please sign in to comment.