if a file is given on the command line, then open only this file
This commit is contained in:
@@ -85,9 +85,13 @@ class OpenFilePlugin(PluginBase):
|
||||
def after_open_file(self, file: str):
|
||||
self._remember_recent_file(file)
|
||||
|
||||
def after_start(self):
|
||||
open_files_as_string = self.settings.get_session('general', 'open_files', fallback='')
|
||||
files = open_files_as_string.split(os.pathsep)
|
||||
def after_start(self, files_from_command_line: [str]):
|
||||
|
||||
if files_from_command_line:
|
||||
files = files_from_command_line
|
||||
else:
|
||||
open_files_as_string = self.settings.get_session('general', 'open_files', fallback='')
|
||||
files = open_files_as_string.split(os.pathsep)
|
||||
if "" in files:
|
||||
files.remove("")
|
||||
for file in files:
|
||||
|
||||
Reference in New Issue
Block a user