-
Notifications
You must be signed in to change notification settings - Fork 622
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
Confusing commit-title-graph option #879
Comments
I also find it confusing between what is shown and what needs to be typed on the prompt line. The confusion is the same for any toggle option. A toggle option should be prefixed by a view name to be well-defined. The documentation mentions it in the 3rd paragraph of
The code for showing a new setting is in the function |
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.
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 #879.
The commit-title-graph option is somewhat confusing: when switching the way how graphs are rendered with ':toggle commit-title-graph' or with the default bindings, 'G', the new setting is shown as 'set commit-title-graph = v1' and similar in the status line. However, the command ':set commit-title-graph = v1' doesn't work ('Unknown option name: commit-title-graph'). Instead, 'set main-view-commit-title-graph = v1' must be used as a command or in config file. This also isn't obvious from the documentation.
The text was updated successfully, but these errors were encountered: