> Looks like the full expansion of the format of expand("<sfile>") changed > sometime between vim 8.1 and 8.2, and as a result it breaks the way some > scripts (LaTeX-Box, in particular) get the SID. > > While tracing this down I realized that docs (Vim 8.2) say: > > If you need to get the script number to use in a complicated script, > you can use this function: > function s:SID() > return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$') > endfun > > Given that expand('<SID>') does the same thing, perhaps you can > replace/remove the above paragraph?
It's not exactly the same thing, and the example can be clearer. I have changed it to: func s:ScriptNumber() return matchstr(expand('<SID>'), '<SNR>\zs\d\+\ze_') endfunc -- Bravely bold Sir Robin, rode forth from Camelot, He was not afraid to die, Oh Brave Sir Robin, He was not at all afraid to be killed in nasty ways Brave, brave, brave, brave Sir Robin. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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 on the web visit https://groups.google.com/d/msgid/vim_dev/202011191747.0AJHlCCP411601%40masaka.moolenaar.net.