On May 16, 2014 12:29 PM, "Alex Efros" <power...@powerman.name> wrote: > > Hi! > > On Fri, Apr 25, 2014 at 03:27:40PM +0200, Bram Moolenaar wrote: > > > My guess right solution should be > > > fun s:Foo() > > > endfun > > > let g:Foo = function('s:Foo') > > > but I'm not 100% sure. > > > > That should be the right way. The more things are script-local the > > better. But check that it actually works. > > User of my plugin just reported this doesn't work on vim-7.3. > I've checked, and looks like 7.3.1214 works ok, but on 7.3.762 it fails. > In 7.3.762 function('s:Foo') return 's:Foo' instead of '<SNR>42_Foo'. > Is there a way to make this change compatible with old 7.3.x?
This change has nothing to do with the change that made function('s:...') work outside of the plugin which defined this funcref. It was a bug that got fixed. To workaround it on old vims you should use manually replace s: with <SNR>N_ when defining funcrefs. AFAIR :h <SID> shows some ways to get N. > -- > WBR, Alex. > > -- > -- > 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. > For more options, visit https://groups.google.com/d/optout. -- -- 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. For more options, visit https://groups.google.com/d/optout.