Problem: More functions can be used as a method.
Solution: Add append(), appendbufline(), assert_equal(), etc.
Also add the :eval command.
25e42231d3
:eval is already ported.
Problem: All builtin functions are global.
Solution: Add the method call operator ->. Implemented for a limited number
of functions.
ac92e25a33
- Note that to *exactly* port hunk @@ -7376,18 +7444,19 from
handle_subscript(), we need the :scriptversion patches (I have an open
PR for those, but this patch works fine without them anyway).
- Port call_internal_func() from v7.4.2058.
- Adjust some error messages in tests, as they rely on the Blob patches.
- Add a modeline to test_method.vim.
Ignore the global_functions and base_method tables and prefer the
current GPerf implementation. Instead, add an extra base_arg field to
VimLFuncDef that holds the number of the argument to use as the base
(1-indexed, so that 0 may be used to refer to functions that cannot be
used as methods).
This also means we support using any argument as a base from the get-go,
rather than just the first (Vim includes this ability in future patches,
however).
To mark a function as usable as a method, use the "base" key as
described in eval.lua.
Problem: win_gettype() does not recognize a quickfix window.
Solution: Add "quickfix" and "loclist". (Yegappan Lakshmanan, closesvim/vim#8676)
28d8421bfb
Problem: Location list only has the start position.
Solution: Make it possible to add an end position. (Shane-XB-Qian,
closesvim/vim#8393)
6864efa596
N/A patches for version.c:
vim-patch:8.2.3002: Vim doesn't abort on a fatal Tcl error
Problem: Vim doesn't abort on a fatal Tcl error.
Solution: Change emsg() to iemsg(). (Dominique Pellé, closesvim/vim#8383)
affd0bc626
vim-patch:8.2.3030: Coverity reports a memory leak
Problem: Coverity reports a memory leak.
Solution: Fix the leak and a few typos. (Dominique Pellé, closesvim/vim#8418)
cb54bc6562
Patch v8.2.3022 is mostly N/A but cannot be included here
because of new feature check for "has()".
vim-patch:8.2.3032: build problems with MSVC, other crypt issues with libsodium
Problem: Build problems with MSVC, other crypt issues with libsodium.
Solution: Adjust MSVC makefile. Disable swap file only when 'key' is set.
Adjust error message used when key is wrong. Fix Coverity issues.
(Christian Brabandt, closesvim/vim#8420, closesvim/vim#8411)
226b28b961
vim-patch:8.2.3044: Amiga MorphOS and AROS: process ID is not valid
Problem: Amiga MorphOS and AROS: process ID is not valid.
Solution: Use FindTask to return something which is unique to all processes.
(Ola Söder, closesvim/vim#8444)
3a62b14077
vim-patch:8.2.3046: Amiga MorphOS: Term mode is set using DOS packets
Problem: Amiga MorphOS: Term mode is set using DOS packets.
Solution: Use the same way of setting term mdoe on all next gen Amiga-like
systems. (Ola Söder, closesvim/vim#8445)
b420ac9d20
Problem: Using getchar() in Vim9 script is problematic.
Solution: Add getcharstr(). (closesvim/vim#8343)
3a7503c34c
Cherry-pick Test_getchar() changes from patch v8.1.2304
to sync with upstream.
Port f_getcharstr() to src/nvim/eval/funcs.c, not src/nvim/getchar.c.
Patch v8.1.2042 is not ported yet.
Some programs behave differently when they detect that stdin is being
piped. This can be problematic when these programs are used with the job
control API where stdin is attached, but not typically used. It is
possible to run the job using a PTY which circumvents this problem, but
that includes a lot of overhead when simply closing the stdin pipe would
suffice.
To enable this behavior, add a new parameter to the jobstart options
dict called "stdin" with two valid values: "pipe" (the default)
implements the existing behavior of opening a channel for stdin and
"null" which disconnects stdin (or, if you prefer, connects it to
/dev/null). This is extensible so that other modes can be added in the
future.
Problem: Cannot use "z=" when 'spell' is off.
Solution: Make "z=" work even when 'spell' is off. (Christian Brabandt,
Gary Johnson, closesvim/vim#6227)
152e79e94b
Problem: It is not possible to customize the quickfix window contents.
Solution: Add 'quickfixtextfunc'. (Yegappan Lakshmanan, closesvim/vim#5465)
858ba06d5f
Problem: Cannot get the search statistics.
Solution: Add the searchcount() function. (Fujiwara Takuya, closesvim/vim#4446)
e8f5ec0d30
Additional changes:
- Tests weren't passing because the test ran assuming the cursor was at
start of buffer but append() left the cursor at end of buffer .
So cursor is moved to start of buffer after append.
- searchcount() added to list of builtin functions.
Update runtime files.
cb80aa2d53
Omit runtime/doc/tabpage.txt.
Patch v8.2.1401 is not ported yet.
Port optwin.vim changes without gettext().
Patch v8.2.1544 is not ported yet.
Problem: Mixing up "long long" and __int64 may cause problems. (John
Marriott)
Solution: Pass varnumber_T to vim_snprintf(). Add v:numbersize.
f9706e9df0
Problem: The eval.txt help file is too big.
Solution: Split off testing support to testing.txt. Move function details
to where the functionality is explained.
ed997adaa1
Vim commit 5477506a9f01d40fad2e8f0555bc37adee30478f
contains the duplicate tag fix in runtime/doc/testing.txt.
Problem: Cannot read back the prompt of a prompt buffer.
Solution: Add prompt_getprompt(). (Ben Jackson, closesvim/vim#6851)
077cc7aa0e
Updated prompt_getprompt() doc to cb80aa2d53
and removed mention of method syntax usage (not supported by Nvim).
Problem: Cannot sort using locale ordering.
Solution: Add a flag for :sort and sort() to use the locale. (Dominique
Pellé, closesvim/vim#7237)
55e29611d2
Replacement for Vim's test_null_string().
Vim uses it to verify that its codebase handles null strings.
Preparation for the Test_null_list() in patch v8.2.1822.
Use v:_null_string, not non-existent env var, for null string tests.
Mention v:_null_string in id() because id(v:_null_string) returns (nil).
...signs is slow
Problem: Placing a larger number of signs is slow.
Solution: Add functions for dealing with a list of signs. (Yegappan
Lakshmanan, closes#4636)
Problem: When 'matchpairs' is empty every character beeps. (Marco Hinz)
Solution: Bail out when no character in 'matchpairs' was found.
(closesvim/vim#8053) Add assert_nobeep().
5b8cabfef7
Problem: shiftwidth() does not take 'vartabstop' into account.
Solution: Use the cursor position or a position explicitly passed.
Also make >> and << work better with 'vartabstop'. (Christian
Brabandt)
f951416a83
Problem: Cannot parse a date/time string.
Solution: Add strptime(). (Stephen Wall, closes #)
10455d43fe
N/A patches for version.c:
vim-patch:8.1.2344: Cygwin: warning for using strptime()
Problem: Cygwin: warning for using strptime().
Solution: Move defining _XOPEN_SOURCE and __USE_XOPEN to vim.h. (Ken Takata,
closesvim/vim#5265) Use 700 for _XOPEN_SOURCE for mkdtemp().
6a228c6463
Problem: Named function arguments are never optional.
Solution: Support optional function arguments with a default value. (Andy
Massimino, closesvim/vim#3952)
42ae78cfff
Problem: Can't get the exit value in VimLeave or VimLeavePre autocommands.
Solution: Add v:exiting like in Neovim. (Yegappan Lakshmanan, closesvim/vim#7395)
f0068c5154
Rearrange VimVarIndex enums and vimvars[] entries to sync with Vim.
N/A patches for version.c:
vim-patch:8.2.2535: MS-Windows: cannot run all vim9 tests
Problem: MS-Windows: cannot run all vim9 tests.
Solution: Make test_vim9 target work.
723ef5db98
Before #12937, the only way to specify the `$TERM` for a pty job was
through the `TERM` key in the job's opts dict. This was shuttled to the
child process throug a special field on the PtyProcess object and
injected into the environment after forking.
Now that we have a proper way to specify the environment for a job, we
can simply ensure that the env dict has a proper `TERM` set and avoid
the extra shuttling of data around.
This deprecates the use of the `TERM` option, but will still honor it if
present, although at a lower priority than a `TERM` present in the env
dict.
This also fixes#13874 because we're no longer trying to overwrite
`TERM` in the env dict with the special pty `term_name`. Doing so
raises an internal error because of the existing key which, under
certain circumstances, would cause the "hit enter" prompt. However,
since the child process had already forked, there was no way for the
user to acknowledge the prompt and we would just hang there.
Problem: Cannot easily get all the current marks.
Solution: Add getmarklist(). (Yegappan Lakshmanan, closes#6032)
cfb4b47de0
Cherry-pick the column number fix from patch v8.2.0871
because patch v8.2.0871 cannot be fully ported
without the method patches.
Co-authored-by: Peter Wolf <pwolf2310@gmail.com>
Problem: Cannot get window type for autocmd and preview window.
Solution: Add types to win_gettype(). (Yegappan Lakshmanan, closesvim/vim#6277)
0fe937fd86
Cherry-pick test_preview.vim,test_window_cmd.vim changes
from patch v8.2.0522.
Problem: trim() always trims both ends.
Solution: Add an argument to only trim the beginning or end. (Yegappan
Lakshmanan, closesvim/vim#6126)
2245ae18e3
Problem: Quickfix buffer shows up in list, can't get buffer number.
Solution: Make the quickfix buffer unlisted when the quickfix window is
closed. get the quickfix buffer number with getqflist().
(Yegappan Lakshmanan, closesvim/vim#4113)
647e24ba3d
Problem: Cannot easily change the current quickfx list index.
Solution: Add the "idx" argument to setqflist(). (Yegappan Lakshmanan,
closesvim/vim#3701)
5b69c22fd2
Problem: Dictionary with string keys is longer than needed.
Solution: Use *{key: val} for literaly keys.
d5abb4c877
Vim's popup,textprop features are N/A.
Neovim has not polyfilled their APIs.
Skip docs and tests for these features.
* support for :perl, :perlfile, :perldo and perleval()
* document that the perl provider doesn't currently work on Windows
* document that the perl legacy interface is now also supported
* added perleval() documentation
* import legacy perl interface tests
* only perl 5.22+ is supported
* healtcheck: use g:perl_host_prog if its set instead
using just 'perl' isn't correct as it may not be the version requested.
ditto for 'cpanm', rather go through 'App::cpanminus' to find the latest
perl version
- remove redundant autocmd list
This "grouped" list is useless, it only gets in the way when searching
for event names.
- intro.txt: cleanup
- starting.txt: update, revisit
- doc: `:help bisect`
- mbyte.txt: update aliases 1656367b90. closes#11960
- options: remove 'guifontset'. Why:
- It is complicated and is used by almost no one.
- It is unlikely to be implemented by Nvim GUIs (complicated to parse,
specific to Xorg...).
Problem: Not so easy to interrupt a script programatically.
Solution: Add the interrupt() function. (Yasuhiro Matsumoto, closesvim/vim#2834)
67a2deb9cb
When UV_OVERLAPPED_PIPE was used for the pipe passed to the child process, a
problem occurred with the standard input of the .Net Framework application
(#11809). Therefore, add the overlapped option to jobstart() and change it so
that it is set only when necessary
Problem: Cannot delete a match from another window. (Paul Jolly)
Solution: Add window ID argument to matchdelete(), clearmatches(),
getmatches() and setmatches(). (Andy Massimino, closesvim/vim#4178)
aff749145e
Problem: The "last used" info of a buffer is under used.
Solution: Add "lastused" to getbufinfo(). List buffers sorted by last-used
field. (Andi Massimino, closesvim/vim#4722)
52410575be
Problem: A plugin cannot easily expand a command like done internally.
Solution: Add the expandcmd() function. (Yegappan Lakshmanan, closesvim/vim#4514)
80dad48c50
Problem: :echomsg and :echoerr do not handle List and Dict like :echo does.
(Daniel Hahler)
Solution: Be more tolerant about the expression result type.
461a7fcfce
Add lua functional tests for :echo,:echon,:echomsg,:echoerr
because nvim did not port "test_" functions from Vim
that modify internal state.
Testing :echoerr via try/catch is sufficient.
Problem: MS-Windows: Cannot interrupt gdb when program is running.
Solution: Add debugbreak() and use it in the terminal debugger.
Respect 'modified' in a prompt buffer.
4551c0a9fc
In a multi-window scenario, it is possible to return focus to the last
accessed window via n_CTRL-W_p. However, in the case of a multi-tab
scenario, there was previously no way to return focus to the last
accessed *tab*. Here, that ability is added via n_g<tab>.
Additionally, the index of the previous tab is exposed via
tabpagenr('#'), mirroring the existing functionality of winnr('#').
Problem: Not possible to hide a balloon.
Solution: Hide the balloon when balloon_show() is called with an empty
string or list. Add balloon_gettext().
be0a2597ae
Problem: Cannot get the window id associated with the location list.
Solution: Add the "filewinid" argument to getloclist(). (Yegappan
Lakshmanan, closesvim/vim#3202)
c9cc9c78f2
Problem: Heredoc assignment has no room for new features. (FUJIWARA Takuya)
Solution: Require the marker does not start with a lower case character.
(closesvim/vim#4705)
2458200729
Problem: :let-heredoc does not trim enough.
Solution: Trim indent from the contents based on the indent of the first
line. Use let-heredoc in more tests.
e7eb92708e
Problem: ":write" increments b:changedtick even though nothing changed.
(Daniel Hahler)
Solution: Only increment b:changedtick if the modified flag is reset.
c024b46678
Problem: Cannot get the script line number when executing a function.
Solution: Store the line number besides the script ID. (Ozaki Kiichi,
closesvim/vim#3362) Also display the line number with ":verbose set".
f29c1c6aa3
Problem: If a job exits while waiting on another job, the on_exit
handler is queued but f_jobwait() skips it.
Solution: Always do process_wait(), so that handlers are run during
f_jobwait().
fix#8302
Test case:
$ BUSTED_ARGS="--repeat=2000 --no-keep-going" TEST_FILE=test/functional/core/job_spec.lua TEST_FILTER=waiting make functionaltest
Failure example (macOS CI):
FAILED test/functional/core/job_spec.lua: jobs jobwait will run callbacks while waiting
test/functional/core/job_spec.lua:606: Expected objects to be the same.
Passed in:
(table: 0x1be77c80) {
[1] = 'notification'
[2] = 'wait'
*[3] = {
*[1] = 3 } }
Expected:
(table: 0x1be77d10) {
[1] = 'notification'
[2] = 'wait'
*[3] = {
*[1] = 4 } }
stack traceback:
test/functional/core/job_spec.lua:606: in function <test/functional/core/job_spec.lua:583
Problem: json_encode() does not handle NaN and inf properly. (David
Barnett)
Solution: For JSON turn them into "null". For JS use "NaN" and "Infinity".
Add isnan().
f1b6ac7229
Problem: There is no easy way to manipulate environment variables.
Solution: Add environ(), getenv() and setenv(). (Yasuhiro Matsumoto,
closesvim/vim#2875)
691ddeefb5
Problem: Cannot highlight the "~" lines at the end of a window differently.
Solution: Add the EndOfBuffer highlighting. (Marco Hinz, James McCoy)
58b853460a
Includes minor doc parts from 7.4.1304 for runtime/doc/eval.txt.
Problem: Docs and tests for :const can be improved.
Solution: Improve documentation, add a few more tests. (Ryuichi Hayashida,
closesvim/vim#4551)
1c196e7b17
Problem: Cannot change a line in a buffer other than the current one.
Solution: Add setbufline(). (Yasuhiro Matsumoto, Ozaki Kiichi, closesvim/vim#1953)
b31cf2bb0b