Skip to content

Improve how a toggle option value is shown on the status line#944

Merged
koutcher merged 1 commit intojonas:masterfrom
stevenyvr987:gh_879
Nov 6, 2019
Merged

Improve how a toggle option value is shown on the status line#944
koutcher merged 1 commit intojonas:masterfrom
stevenyvr987:gh_879

Conversation

@stevenyvr987
Copy link
Copy Markdown
Contributor

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 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 #879.

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 koutcher merged commit 80b40c2 into jonas:master Nov 6, 2019
koutcher added a commit to koutcher/tig that referenced this pull request Nov 13, 2021
koutcher added a commit to koutcher/tig that referenced this pull request Nov 20, 2021
koutcher added a commit that referenced this pull request Jan 4, 2022
The regression was introduced by #944 in 80b40c2.

Fixes #1163
vxsl pushed a commit to vxsl/tig that referenced this pull request Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants