I have an example plugin as follows:
class ExampleCommand(sublime_plugin.WindowCommand):
def run(self):
self.window.show_input_panel("Enter path: ", "", self.on_done, None, None)
def on_done(self, name):
current_data = self.window.project_data()["folders"]
current_data.append({
"path": name
})
self.window.set_project_data(current_data)
If I type the full path name of folder on disk in the input panel that pops up, I expect that folder to be added in the SideBar but all it does is remove the existing folders from the SideBar (untracking them). So what’s wrong ?
Assume that the name
is a valid full path name to a directory that exists on the disk.