"Internal" run requests now provide a way to add keybindings for tigrc and tig prompt commands. For example: bind diff F :set diff-options = --full-diff Much of the change to open_run_request() is increased indentation; viewing the diff with whitespace ignored (git show -w or pressing W in tig) reveals the simplicity of the functional changes.
A boolean return value limits the ability of open_run_request() to handle more complex run requests in the future. The "quit, refresh, or do nothing" logic in view_driver(), based on the boolean return value, is easily represented by returning REQ_QUIT, REQ_REFRESH, or REQ_NONE from open_run_request() itself. Returning a request also seems more in line with workings of other functions which process requests. The current view is passed to open_run_request(), which enables it to return REQ_REFRESH as appropriate. For the future, this also opens the door for other queries and actions on the view.
Redrawing is not always enough but is still used as a fallback if the view is unrefreshable.
This allows new diff-options to take effect. The diff view is still unrefreshable when reading data from STDIN.
Preparation for running prompt commands from keybindings.
parse_args() is only used by option_set_command() for the two "argv" style options: blame-options and diff-options. Allowing parse_args() to overwrite the destination enables ":set diff-options = ..." to work more than once from within the tig prompt (or at all if first set via tigrc). This is safe since argv_copy() handles the necessary freeing, added as part of 7dfa0b2.
This is useful for persistent arguments to the diff view instead of setting TIG_DIFF_OPTS or always passing them on the command line invocation.
This ensures that the report is remains visible in all cases, rather than immediately being cleared in some cases. In particular, toggling the diff whitespace behaviour (with W) no longer leaves you unsure of the current state.
This appears to be no longer necessary, and a hold over from when updates were more verbose at the start of and during processing and needed to be cleared when finished (refer to f97f401). More importantly, the call to report_clear() when the view is done updating can hide status messages from the beginning of the update which should remain visible past the end (until some other action clears the status line).
- tig.h:81:1: warning: "__NORETURN" redefined - tig.c:2468: error: subscripted value is neither array nor pointer
... detected with TIG_TRACE.
Reported by Vivien.
Works for the main and diff view. Examples: $ tig --no-walk --stdin < cherry-picks.txt $ git rev-list --author=vivien HEAD | tig show --stdin Requested by Jean-Baptiste Quenot.
But, of course, don't try to run it unless we are actually using it! [ jf: Update NEWS ]
… output The hard-coded dependencies in Makefile were already exactly correct; they just weren't alphabetized as gcc -MM alphabetizes them.
That is, make autoconf abort if it's missing.