File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -7,17 +7,25 @@ def run(self):
77 accessed_ls = int (SETTINGS .get ('accessed_life_span' ))
88
99 now = time .time ()
10+ active_view = sublime .active_window ().active_view ()
1011
1112 for buffer in self .window .views ():
1213 path = buffer .file_name ()
1314
1415 if (
15- path
16+ buffer != active_view
17+ and not buffer .is_loading ()
1618 and not buffer .is_scratch ()
1719 and not buffer .is_dirty ()
20+ and path
1821 and os .path .exists (path ) == True
1922 and now - os .path .getmtime (path ) > modified_ls
2023 and now - os .path .getatime (path ) > accessed_ls
2124 ):
2225 self .window .focus_view (buffer )
23- self .window .run_command ('close_file' )
26+ self .window .run_command ('close_file' )
27+
28+ class lessTabsEvents (sublime_plugin .EventListener ):
29+ def on_new (self , view ):
30+ if ( sublime .load_settings ("lessTabs.sublime-settings" ).get ("close_on_open_new" ) ):
31+ sublime .active_window ().run_command ("less_tabs" )
You can’t perform that action at this time.
0 commit comments