Open Kvaz1r opened 4 years ago
Ok, I found how it can be reproduce:
Very unpleasant bug, I am very glad that started to use git even for small projects :)
It seems that oldPath and path in Location.Exec/0 not equal only while file are opening. After that click on different tabs doesn't change the value. Quick workaround - to remove condition. Edit: No, it doesn't fix the behaviour.
It looks like this is largely because we're relying on side effects from gxui
's PanelHolder
mixin. We'll need to build a custom one that doesn't automatically switch tabs, so that we can have the PanelHolder
's click events trigger our focus.Location
op.
I'll dig in to it. I should be able to get a quick workaround built before too long. For now, try to use ctrl+tab and ctrl+shift+tab to switch tabs.
I'm not sure that such solution will be the best one because it's bind vidar to gxui even more and this way maybe require many changes. And focus.Location op already called when tab changes that's not the problem. The key is in condition because in case selecting tab there isn't editor that gives focus from his own to selected one.
Maybe really just slightly extend/modify FileChanger with method that take single argument - new filename? I can try to do so on the week.
It was even simple than I thought - https://github.com/Kvaz1r/vidar/commit/cfd501cb7979b04a74a560a05d5bcbfee78073c9
Description
Steps to reproduce
Stack trace