-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to add comments into help view [#809]
1. keys.h Add a run_request.help field, analogous to the req_info.help field. 2. options.c a. read_option() Identify any #comment text string that may have accompanied a bind command option, and add it to the head of the argv list (argv[0]), so that it is available to the option_bind_command() when it is eventually called. The #comment text string is trimmed of any white space. b. option_bind_command() Since argv[0] is now a container for a possible comment text string, the function needs to treat the argv list elements as shifted by one. When calling add_run_request(), pass in argv[0] as an extra argument. c. set_repo_config_option() option_bind_command() is directly called to handle keybindings defined in a repo configuration file. argv[0] must be prepared similarly to read_option(). However, argv[0] is set to an empty string, because comment text is never available from a repo configuration file. 3. keys.c a. add_run_request() A help text string is passed in as an extra argument; it is duplicated into the new run_request.help field. 4. help.c a. help_draw() Analogous to drawing req_info.help as a LINE_DEFAULT, draw the run_request.help text using draw_text(), even though it will be misaligned with existing help text.
- Loading branch information
1 parent
36ced9a
commit 6afbd89
Showing
4 changed files
with
40 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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