Skip to content

Commit 15a1a17

Browse files
committed
Fixed the input panel is closed by enter the hide_panel command
is not called. Issue: sublimehq/sublime_text#1827
1 parent 44d59a1 commit 15a1a17

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

SideBar.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,16 @@ class AutoFileNameListener(sublime_plugin.EventListener):
2525
https://forum.sublimetext.com/t/is-possible-to-auto-complete-file-names-on-panels/28415
2626
"""
2727

28+
# Notice, when the input panel is closed by `enter` the `hide_panel` command is not called
29+
# https://github.com/SublimeTextIssues/Core/issues/1827
2830
def on_post_window_command(self, window, command, args):
2931

3032
if command == "hide_panel":
3133
NameComplete.isOnFilePathPanel = False
3234

35+
# def on_selection_modified_async(self,view):
36+
# print( "NameComplete.isOnFilePathPanel: " + str( NameComplete.isOnFilePathPanel ) )
37+
3338
except:
3439
class NameComplete():
3540
isOnFilePathPanel = False
@@ -1302,6 +1307,7 @@ def run(self, paths = [], new = False):
13021307
def on_done(self, old, new):
13031308
key = 'move-'+str(time.time())
13041309
SideBarMoveThread(old, new, key).start()
1310+
NameComplete.isOnFilePathPanel = False
13051311

13061312
def is_enabled(self, paths = []):
13071313
return CACHED_SELECTION(paths).len() == 1 and CACHED_SELECTION(paths).hasProjectDirectories() == False

0 commit comments

Comments
 (0)