runtime(openPlugin): fix unclosed parenthesis in GetWordUnderCursor() Commit: https://github.com/vim/vim/commit/7c930eb61a4204b4bc40a7137f5ace591e87a765 Author: Morton Fox <git...@qslw.com> Date: Sat Feb 1 10:28:52 2025 +0100
runtime(openPlugin): fix unclosed parenthesis in GetWordUnderCursor() Problem: Saw the following error when invoking gx mapping with cursor on a URL: Error detected while compiling function <SNR>95_GetWordUnderCursor: line 7: E1123: Missing comma before argument: return expand(user_var) E116: Invalid arguments for function dist#vim9#Open Solution: The line before "return expand(...)" has two open parentheses but only one close parenthesis. Add another close parenthesis. closes: #16553 Signed-off-by: Morton Fox <git...@qslw.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/plugin/openPlugin.vim b/runtime/plugin/openPlugin.vim index c231dc448..51592f09b 100644 --- a/runtime/plugin/openPlugin.vim +++ b/runtime/plugin/openPlugin.vim @@ -3,7 +3,7 @@ vim9script # Vim runtime support library # # Maintainer: The Vim Project <https://github.com/vim/vim> -# Last Change: 2025 Jan 24 +# Last Change: 2025 Feb 01 import autoload 'dist/vim9.vim' @@ -18,7 +18,7 @@ if !no_gx return url endif - const user_var = get(g:, 'gx_word', get(g:, 'netrw_gx', '<cfile>') + const user_var = get(g:, 'gx_word', get(g:, 'netrw_gx', '<cfile>')) return expand(user_var) enddef -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1te9pH-00Fw8m-Sn%40256bit.org.