| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
| |
Problem: Crash when removing list element in map().
Solution: Lock the list. (closes vim/vim#2652)
https://github.com/vim/vim/commit/db661fb95dc41b7a9438cf3cd4e77f8410bc81c0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Behavioral changes:
1. Added support for lua function in keymaps in
--------------------------------------------
- nvim_set_keymap
Can set lua function as keymap rhs like following:
```lua
vim.api.nvim_{buf_}set_keymap('n', '<leader>lr', '', {callback = vim.lsp.buf.references})
```
Note: lua function can only be set from lua . If api function being
called from viml or over rpc this option isn't available.
- nvim_{buf_}get_keymap
When called from lua, lua function is returned is `callback` key .
But in other cases callback contains number of the function ref.
- :umap, nvim_del_keymap & nvim_buf_del_keymap clears lua keymaps correctly.
- :map commands for displaing rhs .
For lua keymaps rhs is displayed as <Lua function ref_no>
Note: lua keymap cannot be set through viml command / functions.
- mapargs()
When dict is false it returns string in `<Lua function ref_no>`
format (same format as :map commands).
When dict is true it returns ref_no number in `callback` key.
- mapcheck()
returns string in `<Lua function ref_no>` format (same format as :map commands).
2. Added support for keymap description
---------------------------------------
- nvim_{buf_}set_keymap: added `desc` option in opts table .
```lua
vim.api.nvim_set_keymap('n', '<leader>w', '<cmd>w<cr>', {desc='Save current file'})
```
- nvim_{buf_}get_keymap: contains `desc` in returned list.
- commands like `:nmap <leader>w` will show description in a new line below rhs.
- `maparg()` return dict contains `desc`.
|
|
|
|
|
| |
Possibly dialog code is messages.c could be moved here as well.
misc1.c is now empty, so delete it.
|
| |
|
|\
| |
| | |
vim-patch:8.1.1542,8.2.3549: an OptionSet autocommand does not get enough info
|
| |
| |
| |
| |
| |
| |
| | |
Problem: An OptionSet autocommand does not get enough info.
Solution: Add v:option_command, v:option_oldlocal and v:option_oldglobal.
(Latrice Wilgus, closes vim/vim#4118)
https://github.com/vim/vim/commit/d7c968794710f338d491072171df48f96612cf72
|
| | |
|
| | |
|
|/
|
|
|
| |
Disable formatting for assert.h since there's a bug that results in a
segmentation fault in uncrustify.
|
|
|
|
|
|
|
|
|
|
|
| |
vim-patch:8.2.3627: difficult to know where the text starts in a window
Problem: difficult to know where the text starts in a window. (Sergey
Vlasov)
Solution: Add the "textoff" entry in the result of getwininfo().
(closes vim/vim#9163)
https://github.com/vim/vim/commit/cdf5fdb2948ecdd24c6a1e27ed33dfa847c2b3e4
Fix indent in Test_getbufwintabinfo().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sp_enum_after_assign = force
* sp_brace_typedef = force
* nl_do_brace = remove
* sp_do_brace_open = force
* sp_brace_close_while = force
* sp_before_semi = remove
* sp_before_semi_for = remove
* sp_before_semi_for_empty = remove
* sp_between_semi_for_empty = remove
* sp_after_semi_for_empty = remove
* sp_before_square = remove
* sp_before_squares = remove
* sp_inside_square = remove
* sp_inside_fparens = remove
* sp_inside_fparen = remove
* sp_inside_tparen = remove
* sp_after_tparen_close = remove
* sp_return_paren = force
* pos_bool = lead
* sp_pp_concat = remove
* sp_pp_stringify = remove
* fixup: disable formatting for the INIT section
|
|
|
|
| |
clean up docs for MB_PTR_ADV and MB_PTR_BACK
|
|
|
|
|
|
| |
Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
|
|
|
|
|
|
|
|
|
| |
Problem: Giving error messages is not flexible.
Solution: Add semsg(). Change argument from "char_u *" to "char *", also
for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of
an enormous number of type casts.
https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* refactor: general good option changes
sp_deref = remove
sp_not = remove
sp_inv = remove
sp_inside_paren_cast = remove
mod_remove_duplicate_include = true
sp_after_semi = add
sp_after_semi_for = force
sp_sizeof_paren = remove
nl_return_expr = remove
nl_else_brace = remove
nl_else_if = remove
* refactor: mod_remove_extra_semicolon = true
* refactor: nl_max = 3
* refactor: sp_bool = force
* refactor: sp_compare = force
* refactor: sp_inside_paren = remove
* refactor: sp_paren_paren = remove
* refactor: sp_inside_sparen = remove
* refactor: sp_before_sparen = force
* refactor: sp_sign = remove
* refactor: sp_addr = remove
* refactor: sp_member = remove
* refactor: nl_struct_brace = remove
* refactor: nl_before_if_closing_paren = remove
* refactor: nl_fdef_brace = force
* refactor: sp_paren_comma = force
* refactor: mod_full_brace_do = add
|
|
|
|
|
|
| |
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
https://github.com/vim/vim/commit/5d18efecfd6c45d69f55268948a22cd0465bb955
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
| |
|
| |
|
|
|
| |
* fixup: force exactly one whitespace between type and variable
|
|
|
|
|
| |
`lower`, `upper` are `varnumber_T`, correctly matched to `PRIdVARNUMBER`
format.
|
|
|
|
| |
* 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
|