| Commit message (Collapse) | Author | Age |
|
|
|
| |
* fix function parameter comments
* remove space after star in function names
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were issues that I found while porting that I fixed upstream. :^)
Very little of the patch can be exactly ported as we're a bit behind on
dependant patches (we also can't use the exact :for emsg, as we don't
support iterating over Strings yet), so just translate the fixes as best
as we can for now.
Include latest relevant doc changes from:
- v8.1.0815
- v8.2.2658
|
|
|
|
|
|
| |
Problem: Memory leak when adding to a blob fails.
Solution: Clear the second typval before returning.
https://github.com/vim/vim/commit/f2dd9cb9958962302d33fab8fe6439645a2d1e1b
|
|
|
|
|
|
|
| |
Problem: Items in a list given to :const can still be modified.
Solution: Work like ":lockvar! name" but don't lock referenced items.
Make locking a blob work.
https://github.com/vim/vim/commit/021bda56710d98c09a6b35610a476ab2dd8c58ad
|
|
|
|
|
|
|
|
|
| |
Problem: filter() may give misleading error message.
Solution: Also mention Blob as an allowed argument.
https://github.com/vim/vim/commit/fcb0b61d15f66f0e9116a6bc56d9d8105bb913cf
Rename Test_map_fails() to Test_map_filter_fails() from v8.2.0610 and
include the modeline.
|
|
|
|
|
|
| |
Problem: filter() and map() on blob don't work.
Solution: Correct the code. (closes vim/vim#5483)
https://github.com/vim/vim/commit/49c57ce50019b667e5005ce1cfb8cdc2e48bf868
|
|
|
|
|
|
| |
Problem: May use NULL pointer when indexing a blob. (Coverity)
Solution: Break out of loop after using index on blob
https://github.com/vim/vim/commit/61be376337b0374d55a4b1d8206b2ec87ca54252
|
|
|
|
|
|
|
|
| |
Problem: Negative index doesn't work for Blob.
Solution: Make it work, add a test. (closes vim/vim#3856)
https://github.com/vim/vim/commit/a5be9b62480a6f338a72c01e57c9edd0bca8048b
Leave tv_blob_get()'s return type untouched.
|
|
|
|
|
|
| |
Problem: Changing a blob while iterating over it works strangely.
Solution: Make a copy of the Blob before iterating.
https://github.com/vim/vim/commit/dd29ea18050284526174b5685781469240f5bc4a
|
|
|
|
|
|
| |
Problem: String format of a Blob can't be parsed back.
Solution: Use 0z format.
https://github.com/vim/vim/commit/4131fd5509b283e978e8c6161f09643b64719787
|
|
|
|
|
|
|
|
| |
Problem: copy() does not make a copy of a Blob.
Solution: Make a copy.
https://github.com/vim/vim/commit/3d28b58c519c9fc3427587201423c74746cc219e
Replace vim_memsave() with xmemdup().
|
|
|
|
|
|
|
| |
Problem: Using freed memory, for loop over blob leaks memory.
Solution: Clear pointer after freeing memory. Decrement reference count
after for loop over blob.
https://github.com/vim/vim/commit/ecc8bc482ba601b9301a6c129c92a0d1f8527f72
|
|
|
|
|
|
|
|
|
| |
Problem: Code for Blob not sufficiently tested.
Solution: Add more tests. Fix uncovered crash. Add test_null_blob().
https://github.com/vim/vim/commit/c0f5a78c15b194f23bedb82e6825e34f481e6532
eval0 and ex_echo's emsg-specific changes have already been ported.
These tests uncover another crash that was fixed in v8.1.0738.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot handle binary data.
Solution: Add the Blob type. (Yasuhiro Matsumoto, closes vim/vim#3638)
https://github.com/vim/vim/commit/6e5ea8d2a995b32bbc5972edc4f827b959f2702f
Nvim-specific Blob conversions are implemented in future commits.
Refactor write_blob() to use a FileDescriptor, as f_writefile() was
refactored to use one (does not apply to read_blob()).
Use var_check_lock() in f_add() for Blobs from v8.1.0897.
Add a modeline to test_blob.vim and fix some doc typos.
Include if_perl.txt's VIM::Blob() documentation. Interestingly, this
function already worked before this port, as it just returns a Blob
string literal, not an actual Blob object.
N/A patches for version.c:
vim-patch:8.1.0741: viminfo with Blob is not tested
Problem: Viminfo with Blob is not tested.
Solution: Extend the viminfo test. Fix reading a blob. Fixed storing a
special variable value.
https://github.com/vim/vim/commit/8c8b8bb56c724cc1bfc3d8520eec33f2d399697c
vim-patch:8.1.1022: may use NULL pointer when out of memory
Problem: May use NULL pointer when out of memory. (Coverity)
Solution: Check for blob_alloc() returning NULL.
https://github.com/vim/vim/commit/e142a9467a7f6845a426d8db6efedf246d3c13ac
|
|
|
|
|
|
|
|
|
| |
Problem: Error when scriptversion is 2 a making a dictionary access.
Solution: Parse the subscript even when not evaluating the sub-expression.
(closes vim/vim#4704)
https://github.com/vim/vim/commit/61343f0c44c8e71df04918d033e0a744c0b7f8aa
:scriptversion is N/A.
|
|
|
|
|
|
|
|
|
| |
Problem: Obvious mistakes are accepted as valid expressions.
Solution: Be more strict about parsing numbers. (Yasuhiro Matsumoto,
closes vim/vim#3981)
https://github.com/vim/vim/commit/16e9b85113e0b354ece1cb4f5fcc7866850f3685
Update vim_str2nr_spec.lua to add more tests that use strict = true.
|
|\
| |
| | |
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}
|
| | |
|
| |
| |
| |
| |
| | |
That patch also includes a test using test_refcount() for lambdas, but
such test functions are N/A for Nvim.
|
| |
| |
| |
| |
| |
| | |
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: 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: 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: 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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Note: the reason for removing them is not that there after this refactor
is no use of them, but rather that having them available is an
anti-pattern: they manange an _extra_ heap allocation which has
nothing to do with the functionality of the map itself (khash
manages the real buffers internally). In case there happens to
be a reason to allocate the map structure itself later, this
should be made explicit using xcalloc/xfree calls.
|
|/
|
|
|
| |
the only field of Map(...) was a pointer to a khash_t. make it contain
the struct by value instead.
|
| |
|
|
|
|
|
|
| |
Problem: Can modify a:000 when using a reference.
Solution: Make check for locked variable stricter. (Ozaki Kiichi,
closes vim/vim#3930)
https://github.com/vim/vim/commit/05c00c038bc16e862e17f9e5c8d5a72af6cf7788
|
|
|
|
|
|
| |
Problem: Cannot use a lambda with quickfix functions.
Solution: Add support for lambda. (Yegappan Lakshmanan, closes vim/vim#6499)
https://github.com/vim/vim/commit/d43906d2e5969288f239df851f5ad7b1dc2c7251
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Code to handle callbacks is duplicated.
Solution: Add callback_T and functions to deal with it.
https://github.com/vim/vim/commit/3a97bb3f0f8bd118ae23f1c97e55d84ff42eef20
Port Vim's put_callback() as callback_put()
because Neovim's naming convention is {type}_{action},
not {action}_{type}.
Renaming put_callback type as PutCallback.
https://neovim.io/develop/style-guide.xml#Type_Names
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
xstrlcpy() NUL-terminates the destination string
such that reducing the destination string length by 1
to reserve the last byte for NUL is pointless.
https://github.com/neovim/neovim/pull/14490#discussion_r635661185
|
|/
|
|
|
|
| |
Problem: It is not possible to customize the quickfix window contents.
Solution: Add 'quickfixtextfunc'. (Yegappan Lakshmanan, closes vim/vim#5465)
https://github.com/vim/vim/commit/858ba06d5f577b187da0367b231f7fa9461cb32d
|
|
|
|
|
|
|
| |
Problem: Cannot intercept a yank command.
Solution: Add the TextYankPost autocommand event. (Philippe Vaucher et al.,
closes vim/vim#2333)
https://github.com/vim/vim/commit/7e1652c63c96585b9e2235c195a3c322b1f11595
|
|
|
|
|
|
| |
Problem: Line() only works for the current window.
Solution: Add an optional argument for the window to use.
https://github.com/vim/vim/commit/8e0a8e7eb7c177807f44db6b76d8e52314248ab5
|
|\
| |
| | |
vim-patch:8.2.{0174,1933,1935,1946,2286,2287}
|
| |
| |
| |
| | |
Cherry-picked from patch v8.2.0988. Required for patch v8.2.1933.
|
| |
| |
| |
| |
| |
| |
| | |
Update runtime files
https://github.com/vim/vim/commit/d1caa941d876181aae0ebebc6ea954045bf0da24
Cherry-pick error E452 from patch v8.2.0486.
|
| |
| |
| |
| |
| |
| | |
Problem: No easy way to get the maximum or mininum number value.
Solution: Add v:numbermax and v:numbermin.
https://github.com/vim/vim/commit/57d5a01cb45d6edb16c3835a49b42d6d8fc0163e
|
|/
|
|
|
|
|
| |
Problem: Mixing up "long long" and __int64 may cause problems. (John
Marriott)
Solution: Pass varnumber_T to vim_snprintf(). Add v:numbersize.
https://github.com/vim/vim/commit/f9706e9df0e37d214fb08eda30ba29627e97a607
|
|
|
|
|
|
|
|
| |
Problem: "exptype_T" can be read as "expected type".
Solution: Rename to "exprtype_T", expression type.
https://github.com/vim/vim/commit/657137ca487c60d63989236115115161def270a5
Vim9 changes omitted.
|
|
|
|
|
|
| |
Problem: ETYPE_ is used for two different enums.
Solution: Rename one to use EXPR_.
https://github.com/vim/vim/commit/87396072c5c468f0c129e4ec7cd944ac897b7752
|
|
|
|
|
|
| |
Problem: Script test fails.
Solution: For numbers "is" and "isnot" work like "==" and "!=".
https://github.com/vim/vim/commit/ec57ec692eb228ee061824a190d7c451f029c430
|
|
|
|
|
|
|
| |
Problem: Expression type is used inconsistently.
Solution: Add "ETYPE_IS" and "ETYPE_ISNOT" as separate enum values. Rename
"TYPE_" to "ETYPE_" to avoid confusion.
https://github.com/vim/vim/commit/07a3db89b8953bd0964895badb3b662f7514bc10
|