| Commit message (Collapse) | Author | Age |
... | |
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Revert "vim-patch:8.1.2294: cursor pos wrong with concealing and search causes a scroll"
* Add a test which covers #13074 910bbc3cca796f7fa941e0f6176cd0061de0e01c
while reverting the screen.c code changes from there.
Fixes #14064
|
|\ \ \
| | | |
| | | | |
refactor(screen): let win_line() always handle fillers after last line
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Work around a glibc bug where it truncates the argument to fpclassify()
from double to float by implementing fpclassify() ourselves.
Correctness test (Note that the FP_SUBNORMAL test depends on an atof() that
knows how to parse subnormals. Glibc does, not sure about other libcs.):
#include <math.h>
#include <stdint.h>
#include <string.h>
int xfpclassify(double d)
{
uint64_t m;
int e;
memcpy(&m, &d, sizeof(m));
e = 0x7ff & (m >> 52);
m = 0xfffffffffffffULL & m;
switch (e) {
default: return FP_NORMAL;
case 0x000: return m ? FP_SUBNORMAL : FP_ZERO;
case 0x7ff: return m ? FP_NAN : FP_INFINITE;
}
}
#include <assert.h>
#include <stdlib.h>
int main(void)
{
assert(FP_ZERO == xfpclassify(atof("0.0")));
assert(FP_ZERO == xfpclassify(atof("-0.0")));
assert(FP_NORMAL == xfpclassify(atof("1.0")));
assert(FP_NORMAL == xfpclassify(atof("-1.0")));
assert(FP_INFINITE == xfpclassify(atof("inf")));
assert(FP_INFINITE == xfpclassify(atof("-inf")));
assert(FP_NAN == xfpclassify(atof("nan")));
assert(FP_NAN == xfpclassify(atof("-nan")));
assert(FP_SUBNORMAL == xfpclassify(atof("1.8011670033376514e-308")));
return 0;
}
|
| | |
| | |
| | |
| | |
| | | |
Also set new option cmt_trailing_single_line_c_to_cpp to true. It
converts trailing, single-line c-comments (/**/) into cpp-comments (//).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I mistakenly suggested maxlines=&cmdwinheight, forgetting that it is
calculated from topline, not cursor. maxlines=1 makes the most sense in
cmdwin.
ref #15401 622a36b1f1c652a8de433028bc4a03a1216db23f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a new default autocommand to limit syntax highlighting
synchronization in the command window. This refactors the nvim_terminal
autocommand out of main() and into a new init_default_autocmds()
function, which is now part of the startup process and can be further
extended with more default autocommands down the road.
ref #6289 #6399
|
| |/
|/|
| | |
ref #15440
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
jobwait() returns early if the job was stopped, but the job might have
pending callbacks on its event queue which are required to complete its
teardown. State such as term->closed might not be updated yet (by the
pending callbacks), so codepaths such as :bdelete think the job is still
running.
Solution:
Always flush the job's event queue before returning from jobwait().
ref #15349
|
| |
| |
| |
| |
| |
| | |
- If the terminal job is still running then ! is still required.
Closes #4683
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
fixes #15524
Note: this is obviously a quickfix. A scalabe solution will
involve being able to specify a _list_ of modules to be
put into packages.preload, without needing to manually copypasta
a blurb of C code. Perhaps even involving bytecode for
static builds (to speedup initialization)
|
| |
| |
| |
| |
| | |
Problem: After using motion force from feedkeys() it may not be reset.
Solution: Clear motion_force in clearop(). (closes vim/vim#8323)
https://github.com/vim/vim/commit/21492743e80c6740bac65a91311c28bede8ef2f8
|
| | |
|
|\ \
| | |
| | | |
perf(api): avoid spurious allocations when converting small objects
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Converter functions use a heap-allocated stack to handle complex
nested objects. However, these are often called with simple,
primitive values like integers or bools wrapped in an Object.
Avoid the memory allocation in this case using kvec_withinit_t
|
| | |
| | |
| | |
| | |
| | |
| | | |
These functions do not involve msgpack. Initially the nvim api was
sometimes called the "msgpack API", but entry points from vim script
and lua are equally valid (and don't need to reference "msgpack")
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After a process's refcnt is decremented to zero, it enqueues a
`process_close_event` on its own event queue. In `process_wait`, this
event should be processed immediately so that any process close
callbacks are executed before `process_wait` returns.
Update `process_wait` to always process the process's event queue after
the process is freed, rather than the event queue passed in as an
argument.
|
| |
| |
| |
| |
| |
| | |
Remove the trailing slashes from 'undofile' and 'backupdir' before
creating directories. They cause problems on Windows which doesn't
recognize these slashes as proper path separators.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Copy the behavior of 'undodir' and create the last specified directory
in the 'backupdir' option if it doesn't exist.
Use trailing slashes for 'backupdir' as well as 'viewdir' and 'undodir'
by default. Note that 'undodir' always behaves as though it has the
trailing slashes, regardless of whether or not they are present. They
are added to the default option value to minimize surprise.
The '.' value in 'backupdir' is kept because the default behavior for
backups is solely to have a backup if the save of the main file to disk
fails. As soon as that save is completed the backup file is removed, so
generally there is no need to put them in a central location.
Co-authored by: murphy66 <murphy66@gmail.com>
|
| |
| |
| |
| |
| | |
Problem: Cannot color number column above/below cursor differently.
Solution: Add LineNrAbove and LineNrBelow. (Shaun Brady, closes vim/vim#624)
https://github.com/vim/vim/commit/efae76ab1a43d5a628d8c2fa4218ace6ba597f5d
|
|\ \
| | |
| | | |
Port VimL's method call syntax - vim-patch:8.1.{1638,1800,1803,1807,1809,1816,1820,1821,1828,1834,1835,1861,1863,1878,1879,1888,1909,1911,1912}
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
v:lua expressions are represented using vvlua_partial. As v:lua isn't
intended to be called directly, it's given an empty pt_name.
Because of this, calling v:lua directly like "v:lua()" will cause "E117:
Unknown function: ", with an empty name.
Instead, have call_func() show the name "v:lua" in the emsg.
|
| | |
| | |
| | |
| | |
| | | |
That patch also includes a test using test_refcount() for lambdas, but
such test functions are N/A for Nvim.
|
| | |
| | |
| | |
| | | |
Cannot be fully ported as chdir() hasn't been ported yet.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: More functions can be used as methods.
Solution: Make a few more functions usable as a method.
https://github.com/vim/vim/commit/64b4d73524b9a2304d89b87529cd8d3cef14b856
Note that the old-style version of Test_byteidx() was already translated
to a Lua test in 069_multibyte_formatting_spec.lua. Keep both versions,
using Test_byteidx() to mainly test the method call syntax for byteidx()
and byteidxcomp().
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: More functions can be used as methods.
Solution: Make a few more functions usable as a method.
https://github.com/vim/vim/commit/e49fbff384e45dd17fed72321c26937edf6de16b
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
https://github.com/vim/vim/commit/073e4b92e613d22ce7b16e0fbf5c0e40cb5f9b2c
test_popup.vim already has the changes from this patch (they're N/A
anyway).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: More functions can be used as methods.
Solution: Make float functions usable as a method.
https://github.com/vim/vim/commit/93cf85f9ef02931de3f8c8e536a137da0b48b7dc
Fix atan2() doc typo (patch referred to it as atan()).
Adjust Test_fmod() method test to expect "str2float('nan')".
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Negative float before method not parsed correctly.
Solution: Apply "!" and "-" in front of expression before using ->.
https://github.com/vim/vim/commit/9cfe8f6e68de4bfb5942d84f4465de914a747b3f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Confusing error when using a builtin function as method while it
does not support that.
Solution: Add a specific error message.
https://github.com/vim/vim/commit/9174639a82799011cfa0013cbc4c4709b3833bf0
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Only some assert functions can be used as a method.
Solution: Allow using most assert functions as a method.
https://github.com/vim/vim/commit/24278d2407dfbc8d93eb36593cdd006ff5d86f94
Port tests to assert_spec.lua.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Cannot use printf() as a method.
Solution: Pass the base as the second argument to printf().
https://github.com/vim/vim/commit/fd8ca21b3ff207e44891aef922935d4adcd140cf
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Cannot use a lambda as a method.
Solution: Implement ->{lambda}(). (closes vim/vim#4768)
https://github.com/vim/vim/commit/22a0c0c4ecd23b6c43f79ba9b92899ca0b426e29
Add an additional lua_funcname argument to call_func_rettv() to maintain
support for v:lua.
A memory leak was introduced with this patch that was fixed in
v8.1.2107.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Not strict enough checking syntax of method invocation.
Solution: Check there is no white space inside ->method(.
https://github.com/vim/vim/commit/5184132ec015f5889a3195d911e609d214f06bed
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: No test for wrong number of method arguments.
Solution: Add a test.
https://github.com/vim/vim/commit/f97d46f816e84edb6899a903a1c334a50a6d31bb
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Using expr->FuncRef() does not work.
Solution: Make FuncRef work as a method.
https://github.com/vim/vim/commit/761fdf01c6e307c448cec2684f8b315ba6d1f454
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Cannot use a user defined function as a method.
Solution: Pass the base as the first argument to the user defined function
after "->". (partly by FUJIWARA Takuya)
https://github.com/vim/vim/commit/fcfe1a9b8950b8b211ab3b24d84b17c6847ea43f
|
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: More functions can be used as a method.
Solution: Add has_key(), split(), str2list(), etc.
https://github.com/vim/vim/commit/a74e4946de074d2916e3d6004f7fa1810d12dda9
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: More functions can be used as a method.
Solution: Add append(), appendbufline(), assert_equal(), etc.
Also add the :eval command.
https://github.com/vim/vim/commit/25e42231d3ee27feec2568fa4be2aa2bfba82ae5
:eval is already ported.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: All builtin functions are global.
Solution: Add the method call operator ->. Implemented for a limited number
of functions.
https://github.com/vim/vim/commit/ac92e25a33c37ec5becbfffeccda136c73b761ac
- 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: Function call functions have too many arguments.
Solution: Pass values in a funcexe_T struct.
https://github.com/vim/vim/commit/c6538bcc1cdd1fb83732f22fdc69bd9bb66f968a
Use FUNCEXE_INIT to initialize funcexe_T instances.
call_callback() and other Vim listener related stuff is N/A.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Running tests leaves some files behind.
Solution: Delete the files. (Ozaki Kiichi, closes vim/vim#4617)
https://github.com/vim/vim/commit/3940ec6d41a07f9abbfba7d4db6b49d3d8b43a9a
Required for v8.1.1888.
N/A patches for version.c:
vim-patch:8.1.1912: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make channel and job functions usable as a method.
vim/vim@570497a
|
| | |
| | |
| | |
| | |
| | |
| | | |
Cherry-pick Test_call() and Test_cindent_func().
Required for v8.1.1911 and v8.1.1915.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
v8.1.0736 made some changes for making some emsgs more specific.
Includes the change for Test_lambda_fails() in test_lambda.vim.
Adjust relevant functionaltests to expect the new emsgs.
This patch has been fully ported in my Blob port PR, but it hasn't been
merged yet, so just use what we need from it for now.
Required for v8.1.1821.
|
| | |
| | |
| | |
| | |
| | | |
Problem: Buffer overflow when completing long tag name.
Solution: Allocate the buffer dynamically. (Gregory Anders, closes vim/vim#8769)
https://github.com/vim/vim/commit/489d60996deb5e7c1a3b4633412d54632e6def42
|
| | |
| | |
| | |
| | |
| | |
| | | |
One step further towards stable tree-sitter.
Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
|
| | |
| | |
| | | |
A step towards reproducible builds.
|