Hi Bram, On Sun, Mar 20, 2022 at 3:43 AM Bram Moolenaar <[email protected]> wrote:
> We can keep using sourcing_a_script(), hide the details of how that is > decided. > I have updated the PR to restore this function. > I don't think we should try to be clever and detect the kind of script. If > someone sources some sequence of buffer lines we can't really know whether > they are legacy or Vim9 script. They could even be some lines in a help > file. We can require using "vim9cmd source". Unless "vim9script" is the > first command in the range of lines. > Currently the code relies on the first sourced line to detect the script type and doesn't try to detect the type of script. > We also need to define what happens when sourcing from the same buffer > again. I suppose this would work like "vim9script noclear". That way you > could, for example, source a function again after modifying it. > > > Yes. I have added a test for sourcing a Vim9 script with a function multiple times. - Yegappan -- -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7mUzB2YWGfP-VXqUjZ9ijUWtVu3K%3D_VGd9V8NcUv_r71A%40mail.gmail.com.
