-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(:source, nvim_exec): :verbose line numbers for anon vim script
Support showing line numbers for Vim script sourced anonymously via :source (no args) and nvim_exec. For buffer :sources from a range, adjust the line number from the line number of the range start. Do not offset the line number shown from anonymous scripts with the line number of an enclosing script. For example, this could produce incorrect numbers in situations where we have escaped NLs: ```vim echo "hi" call nvim_exec("\n\n\nset cul", 1) verbose set cul? ``` Would print "line 6" (preferably "line 5"), but it's actually on line 2... It's better to just show the line number of the anonymous script only; :verbose will only show the name of that one anyway. Fix the order of nlua_set_sctx in set_option_sctx_idx; the current order will erroneously offset the line number from the Lua script... Added a test.
- Loading branch information
Showing
5 changed files
with
98 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters