Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 6, 2019

Conversation

stevenyvr987
Copy link
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
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