From: Birger Skogeng Pedersen Date: Thu, 26 Sep 2019 21:17:46 GMT Subject: Re: git-gui: automatically move focus to staged file before typing commit message? Message-ID: In-Reply-To: <20190926193004.jspiirmb4ejxznjo@yadavpratyush.com> On Thu, Sep 26, 2019 at 9:30 PM Pratyush Yadav 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). > Did you try binding a script to the FocusIn event of the commit message > buffer? You can do this like: > > bind $ui_comm {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