Improve how a toggle option value is shown on the status line #944
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 = 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 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->name
as a prefix to option name. A macro wrapper forsuccess()
is used to reduce repetition.Fixes issue #879.