This PR fixes an issue with pcall and nvim_get_var that caused the global variables for configuring the plugin to not work properly. The original code used a table with 2 strings in the pcall call, but nvim_get_var expected only a single string not a table (:h nvim_get_var).
If a table is passed as the second argument to pcall, its items are not treated as single argument to pass to multiple function calls. (though that would be cool)
pcall({f}, {arg1}, {...}) *luaref-pcall()*
Calls function {f} with the given arguments in `protected mode`.
To fix this issue, I modified the code to read the 2 global variables (gist_is_private and gist_clipboard) in 2 separate calls to nvim_get_var.
I have tested this change on my local machine and verified that it works as expected.
This PR fixes an issue with
pcall
andnvim_get_var
that caused the global variables for configuring the plugin to not work properly. The original code used a table with 2 strings in thepcall
call, butnvim_get_var
expected only a single string not a table (:h nvim_get_var
).If a table is passed as the second argument to
pcall
, its items are not treated as single argument to pass to multiple function calls. (though that would be cool)To fix this issue, I modified the code to read the 2 global variables (
gist_is_private
andgist_clipboard
) in 2 separate calls tonvim_get_var
.I have tested this change on my local machine and verified that it works as expected.