Conversation
`:RHelp` now works with symbols such as `%`, `(` and `|`
|
How to try the new
|
|
Very good! Some comments coming. |
| local libs = vim.split(libs_in_rns, ",", { trimempty = true }) | ||
| libs_in_rns = "" | ||
| rhelp_list = {} | ||
| M.rhelp_list = {} |
There was a problem hiding this comment.
| M.rhelp_list = {} | |
| rhelp_list = {} |
I am not sure, but I think that subsequent calls to fill_Rhelp_list will keep appending duplicates to rhelp_list since it's never reset.
| --- _ string The complete command line, including "Rhelp". | ||
| --- _ number Cursor position in complete command line. | ||
| M.list_objs = function(arg, _, _) | ||
| if arg == "" then return rhelp_list end |
There was a problem hiding this comment.
| if arg == "" then return rhelp_list end | |
| if libs_in_rns ~= "" then fill_Rhelp_list() end | |
| if arg == "" then return rhelp_list end |
Should this be the way around?
There was a problem hiding this comment.
Line 310 resets libs_in_rns:
libs_in_rns = ""The logic is:
- If there is a change in the list of loaded libraries, the string
libs_in_rnsis updated. That's all. Nothing else happens. - Only if the completion for
:RHelpis triggered, allalias_files from the libraries listed inlibs_in_rnsare read,rhelp_listis filled, andlibs_in_rnsis reset.
Perhaps, a better name for libs_in_rns could be new_libs_in_rns because when the variable is empty, it doesn't mean that there is no library; only that the list of libraries was already used to fill rhelp_list.
|
Just few comments, you can check if that makes sense, but all good on my side. Good job. |
|
I changed the name of the variable. I think the code is clearer now. Thank you for reviewing! |
|
yay! |
:RHelpnow works with symbols such as%,(and|