jonas / tig

Text-mode interface for git
https://jonas.github.io/tig/
GNU General Public License v2.0
12.27k stars 605 forks source link

keybind with `+[cmd]` would not trigger view refreshing #1323

Closed liangkarl closed 3 months ago

liangkarl commented 3 months ago

Hello,

I have a question about @ and +. Simply compare @ with +. bind stage co @git checkout %(file) would trigger view refreshing automatically, but bind stage co +git checkout %(file) would not.

I have no idea how to output the first line of the results and refresh the view at the same time. Does anyone could help to fix the problem? Thanks!

       @   Run the command in the background with no output.
       +   Run the command synchronously, and echo the first
           line of output to the status bar.
koutcher commented 3 months ago

When you use +, the view trigger is bypassed otherwise you wouldn't see the text in the status line.

liangkarl commented 3 months ago

Got it. So, it's a dependent behavior with showing text and refreshing view, right? Is it possible to adjust the sequence like refresh view before show the text in status bar? Since I have tried to change to <, > and !, as well as adjust refresh-mode, I have no idea how to make it.

koutcher commented 3 months ago

You can't without code change. Try with #1324. It requires the removal of a report_clear() call in view.c that doesn't seem to do any harm and at least doesn't fail any test but more thorough non regression testing will be needed before considering merge.

liangkarl commented 3 months ago

Okay, thanks a lot!