are lambdas being used for legacy?

11 views
Skip to first unread message

Charles Campbell

unread,
Jul 15, 2021, 2:32:45 PM7/15/21
to vim...@googlegroups.com
Hello:

I'm not knowingly using lambdas. I'm trying to debug some netrw code and
I keep ending up with the following error:

." is a directory
Error detected while processing VimEnter Autocommands for "*"..function
<SNR>72_VimEnter[15]..<lambda>1[1]..<SNR>72_LocalBrowse[32]..netrw#LocalBrowseCheck:
line   26:
E171: Missing :endif
Press ENTER or type command to continue

There are no mismatched if-endif s in netrwPlugin.vim (LocalBrowse). The
error appears to occur early in netrw#LocalBrowseCheck; early enough
that I can visuallly verify that there aren't any mismatched
if-elseif-endifs there, either. I have Decho-style debugging on in
netrw.vim but not in netrwPlugin.vim.

It appears that the message is incorrect. By putting Decho()s into the
code, I've narrowed down where the error appears to occur: redir @a .
The command I'm interested in hasn't even run yet (ls!). Any hints?

Chip Campbell

Bram Moolenaar

unread,
Jul 15, 2021, 5:02:48 PM7/15/21
to vim...@googlegroups.com, Charles Campbell
I suppose this is with a locally modified autoload/netrw.vim.
With the current version I don't see any problem.
When loading a script file the function lines are read to find the
matching :endfunc, without fully parsing them.
I would suggest to delete lines until the problem goes away.
That should pinpoint the problem.
I can't predict it is an actual problem with perhaps a confusing error
message, or a yet undiscovered bug.

--
hundred-and-one symptoms of being an internet addict:
157. You fum through a magazine, you first check to see if it has a web
address.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages