Re: git-gui: automatically move focus to staged file before typing commit message?
- From
Birger Skogeng Pedersen <birger.sp@gmail.com>
- Date
- Oct 7, 2019, 16:52 UTC
- Message-ID
- <CAGr--=KXpt7GzqPpm1BCrsc1jhfaXeCT-XrWKNvq2pLtgAbSwQ@mail.gmail.com>
- In-Reply-To
- <CAGr--=Jiu-haHMX2fc8AB1uGWT1OMw5=M3_CuGWVzrYmO0uq3A@mail.gmail.com>
So I kinda got this working, but only when focusing the commit message widget.
I did not manage to get it working when invoking "do_add_all", (e.g. when pressing CTRL/CMD+i). I added this:
bind $ui_comm <$M1B-Key-i> {do_add_all;select_staged_file;break} bind $ui_comm <$M1B-Key-I> {do_add_all;select_staged_file;break}
But it seems that the "select_staged_file" procedure is invoked _before_ "do_add_all" finishes. So that's not working. All changes gets staged, but no staged change is selected.
And I'm quite stuck. Do I send the unfinished patch, so maybe I can get some advice? Or is it better to just wait until I have the perfect patch ready?
Birger