Improve how a toggle option value is shown on the status line#944
Merged
koutcher merged 1 commit intojonas:masterfrom Nov 6, 2019
Merged
Improve how a toggle option value is shown on the status line#944koutcher merged 1 commit intojonas:masterfrom
koutcher merged 1 commit intojonas:masterfrom
Conversation
Whenever a view column option is toggled, the new setting is echoed on the status line, but it does not mimic what should be typed on the status line using the set command to achieve the same thing. For example, the message 'set commit-title-graph = v1' is shown but the user needs to type ':set main-view-commit-title-graph = v1' on the status line to achieve the same setting, ie, the user needs to type colon to initiate prompt mode, and then type the view name as a prefix to the option name. The PR modifies prompt_toggle_option() to show exactly what needs to be typed on the status line. The function called success() with a format string, an option name, and an option value to generate a status line for each type of option value. The format string is modified to include view->name as a prefix to option name. A macro wrapper for success() is used to reduce repetition. Fixes issue jonas#879.
koutcher
added a commit
to koutcher/tig
that referenced
this pull request
Nov 13, 2021
The regression was introduced by jonas#944 in 80b40c2. Fixes jonas#1163
koutcher
added a commit
to koutcher/tig
that referenced
this pull request
Nov 20, 2021
The regression was introduced by jonas#944 in 80b40c2. Fixes jonas#1163
koutcher
added a commit
that referenced
this pull request
Jan 4, 2022
vxsl
pushed a commit
to vxsl/tig
that referenced
this pull request
Mar 18, 2026
The regression was introduced by jonas#944 in 80b40c2. Fixes jonas#1163
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Whenever a view column option is toggled, the new setting is echoed on the status line, but it does not mimic what should be typed on the status line using the set command to achieve the same thing.
For example, the message
set commit-title-graph = v1is shown but the user needs to type:set main-view-commit-title-graph = v1on the status line to achieve the same setting, ie, the user needs to type a colon to initiate command mode, and then type the view name as a prefix to the option name.The PR modifies
prompt_toggle_option()to show exactly what needs to be typed on the status line. The function calledsuccess()with a format string, an option name, and an option value to generate a status line for each type of option value. The format string is modified to includeview->nameas a prefix to option name. A macro wrapper forsuccess()is used to reduce repetition.Fixes issue #879.