Saturday, April 9, 2022

Re: Embed langage print when sourcing vim9script

> Is it normal to get print of embed langage when I source vim9script ?
>
> Thank you
> NV
>
> def g:SwitchFtHelper(): void # Syntax / Filetype - Helper {{{
>
> if ( !exists('g:cachebufnr') )
> g:cachebufnr = bufnr('%')
> g:cacheft = &ft
> StampedEcho( 'Cached filetype is ' .. g:cacheft .. ' and bufnr is ' ..
> g:cachebufnr )
> endif
>
> lua << EOF
>
> print('foo')
>
> EOF
>
> enddef

When I source this I see nothing. Only when calling g:SwitchFtHelper()
(commenting out what doesn't work) I see "foo" printed. Looks fine to
me.

--
A M00se once bit my sister ...
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@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 ///

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20220409100139.8A79A1C0917%40moolenaar.net.

No comments: