Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Jump directly to directory if only one result
Browse files Browse the repository at this point in the history
  • Loading branch information
externl committed Nov 2, 2017
1 parent 84e42d3 commit f675153
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ def mode_list(self, z):
try:
directory_list = z.getList()
if directory_list:
self.show_directories(directory_list)
if len(directory_list) == 1:
self.open_directory(directory_list[0])
else:
self.show_directories(directory_list)
else:
sublime.message_dialog('No matches for {}'.format(z.directory_regex))
except Exception as e:
Expand Down

0 comments on commit f675153

Please sign in to comment.