Closed tukusejssirs closed 2 years ago
Sorry, I didn't see your issues before ! The project indicator in the status bar is bound to a view, and so when you close a project, no view remains and the indicator is not removed. However, the moment you reopen a new view (i.e. a file, an image or anything in a tab really), the indicator disappears and the status bar is fixed. I feel like this is not an issue as a window never stays empty and as soon as you close a project, either the window is closed or a new file is opened, thus fixing the indicator.
Is this also the behavior you observe, or am I missing something ? If it is, I'm not sure entirely sure in which context it can be disturbing. One way to fix this would be to put an event listener each time any tab is closed, but I think it would be a big overhead compared to the small issue it fixes. I'd like to hear your opinion about this !
What's weird is that I use exactly the same code ! If you look at the plugin code, I'm calling exactly the same methods, so I'm really not sure what could be the difference between the two behaviors.
I'm gonna add a way to force update the status bar when a view is closed then, tell me if that fixes it.
Unfortunately, the change didn’t fix the issue.
I have just double-checked that my plugin updates status bar immediately after I close the project/workspace, while PM updates it only after I either:
However, It immediately appears when I open a project.
Could the order be important? Or something else?
That's really weird. I'm not really sure what to tell you here, I don't think the plugin is doing anything different, and on my computer the status message disappears immediately when closing the project, so I don't know what could cause the issue in your case, sorry... Maybe Sublime doesn't update in some specific cases, but I am not sure there's a way for us to tell if that is the case.
Maybe Sublime doesn't update in some specific cases, but I am not sure there's a way for us to tell if that is the case.
Yeah, so I think too. You see, my code is quite simple, while PM contains much more code (for other features), that’s why I talked about the order. Maybe if we move updating the status panel to top of the functions and/or conditions, it might fix it.
I’ll try 5o find some time and test this out.
on my computer the status message disappears immediately when closing the project
Well, maybe your computer (DE/WM) behaves differently to Sway. Could you share with me your OS/distro version please? I’d like to test my ST config (incl plugins etc) on OS you use. Thanks! :pray:
I’d expect that when I close a currently open workspace using
close_workspace
command (orProject
→Close Project
),[project_name/workspace_name]
would be removed from there or at least some arbitrary string (liken/a
orno project open
) would be output. I’d prefer the first option though (output nothing), as it is how it works when no project was open in the current window yet.