Re: git-gui: automatically move focus to staged file before typing commit message?
- From
Birger Skogeng Pedersen <birger.sp@gmail.com>
- Date
- Sep 26, 2019, 21:17 UTC
- Message-ID
- <CAGr--=Jiu-haHMX2fc8AB1uGWT1OMw5=M3_CuGWVzrYmO0uq3A@mail.gmail.com>
- In-Reply-To
- <20190926193004.jspiirmb4ejxznjo@yadavpratyush.com>
On Thu, Sep 26, 2019 at 9:30 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> Why are you changing the Alt+4 binding?
I couldn't really find an easier way before.
> This means your feature won't > work for people who use the mouse to move around in the UI (which I > suppose would be a majority).
True. I would much prefer that the staged file is selected on commit widget focus, regardless of how the focus was changed (hotkey or mouse).
Show 7 quoted lines
> Did you try binding a script to the FocusIn event of the commit message
> buffer? You can do this like:
>
> bind $ui_comm <FocusIn> {your_script}
>
> I'm not sure if $ui_comm is the correct widget, but you can experiment a
> bit by printing something in your_script to find out for sure.Ah, that's pretty neat! I'll play around with that. Thanks, Pratyush.
Birger