aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/source_spec.lua
Commit message (Collapse)AuthorAge
* fix(source): fix expand('<sfile>') no longer works for Luazeertzjq2022-08-16
|
* fix(source): make changing 'shellslash' change expand() resultzeertzjq2022-08-15
|
* test: add a test for what Vim patch 8.2.0151 fixeszeertzjq2022-07-08
|
* feat(:source, nvim_exec): defer script item creation until s:var accessSean Dewar2021-10-14
| | | | | | | | For anonymous scripts, defer the creation of script items until an attempt to access a script-local variable is made. This dramatically reduces the number of script items created when using lots of vim.cmd and nvim_exec especially. This will mean <SID> usage fails until a script-local variable access is first made.
* feat(:source, nvim_exec): support script-local variablesSean Dewar2021-10-14
| | | | | | | | | | | | | | Based on #13143 (and #11507) with changes: - Omit script_type_E. Use sn_name == NULL to determine anon items. - Keep SID_STR. Used by anon :source for .lua files (no item). - Show SID in get_scriptname output (:verbose set). - Factor item creation into new_script_item. - Leave sc_seq = 0 (anon scripts don't re-use the same item when re-sourced). - Add tests for anon :source. Co-authored-by: Vikram Pal <vikrampal659@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* fix(:source): copy curbuf lines to memory before sourcing #15111Sean Dewar2021-09-15
| | | | | | | | | It's possible for weirdness to happen if curbuf is modified while sourcing from it via :source (with no arguments). For example: - Deleting lines from or wiping curbuf can cause internal error E315 to be thrown from ml_get. - Changing the curbuf to another buffer while sourcing can cause lines from the new curbuf to then be sourced instead.
* fix(:source, nvim_exec): handle Vimscript line continuations #14809Sean Dewar2021-09-14
| | | | | | | | | | | Problem: Anonymous :source (no args) and nvim_exec() don't support Vimscript line continuations. Solution: Factor out the concat logic into concat_continued_line() and a CONCAT_CONTINUED_LINES macro for simple concatenations where lines are fetched individually. Closes #14807
* fix(source): Source giving E484 & parsing error at line 1 for lua filesshadmansaleh2021-06-21
| | | | | | | | | | | It's happening because do_source is only expected to return FAIL when it was unable to open file . But `nlua_exec_file` returns fail for parsing and execution error too . Those errors are emitted through `nlua_error`. So now return value of nlua_exec_file is ignored like do_cmdline. It now only returns fail when it was unable to open file that check is done before calling nlua_exec_file or do_cmdline. Errors in nlua_exec_file are still directly emitted through nlua_error like before.
* refactor(source): Move lua file detection to do_sourceshadmansaleh2021-06-11
| | | | | | So now :source can run lua files too :) * feat: Add support for :[ranged]source for lua files
* [RFC] ":source" sources from current buffer if filename is omitted (#11444)Vikram Pal2021-02-18
Fix https://github.com/neovim/neovim/issues/8722