it always return to 'Status [1]' tab after editing a file from 'Files [3]' tab. any way to change it?
Describe the bug I set $EDITOR to vim and I need to edit more than one files from the 'Files' tab. However, each time when I quit from vim, gitui always return to the first 'Status' tab. I can understand the purpose of this but I do need to continue editing other files instead of checking the changed status.
is there any config to change this? thanks!
To Reproduce Steps to reproduce the behavior:
- Go to tab 3
- navigate to and open a file
- quit the editor
- it return to tab 'Status'
Expected behavior I would like it stay on the 'Files' tab so that I could edit other files
I think this is a bug, itβs probably hardcoded. Let me investigate this
ok this is actually intended right now:
//Note: switch to status tab so its clear we are
// not altering a file inside a revision here
self.queue.push(InternalEvent::TabSwitchStatus);
self.queue.push(InternalEvent::OpenExternalEditor(Some(file)));
the problem here is: the edit command will also be exposed to checking the whole file tree in any arbitrary revision, so calling edit then will lead to confusing results as the file opened (from disk) does not necessarily look like in the view.
two ideas:
- don't allow edit in revision that's not up to date.
- always show a warning popup first:
this file will be opened from disk and not from the state seen here
from my side, don't allow edit in revision that's not up to date seems more reasonable by default.
what about a switch config for this if it is not easy to trade off?