| Commit message (Collapse) | Author | Age |
... | |
| | |
|
| |
| |
| |
| |
| |
| | |
Problem: "gF" does not work on output of "verbose command".
Solution: Recognize " line " and translations. (closes vim/vim#5391)
https://github.com/vim/vim/commit/64e74c9cc7d5aab215cf72d9bdd3aac32e128191
|
| |
| |
| |
| |
| | |
Problem: Repeated word in comment.
Solution: Remove one. (Rene Nyffenegger, closes vim/vim#5384)
https://github.com/vim/vim/commit/fe72d08400d9064b3f959f1f62f279527e64835a
|
|/
|
|
|
| |
fixes #11494
|
| |
|
|
|
|
|
|
| |
Problem: Reloading a script gives errors for existing functions.
Solution: Allow redefining a function once when reloading a script.
https://github.com/vim/vim/commit/ded5f1bed7ff2d138b3ee0f9610d17290b62692d
|
|
|
|
|
|
|
| |
Problem: Cannot get the script line number when executing a function.
Solution: Store the line number besides the script ID. (Ozaki Kiichi,
closes vim/vim#3362) Also display the line number with ":verbose set".
https://github.com/vim/vim/commit/f29c1c6aa3f365c025890fab5fb9efbe88eb1761
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Re-enable Test_BufLeave_Wipe. 66f5e5c7d7ce
This is my (probably-wrong) application of Zyx's suggestion in #9163:
> free_buffer_stuff() already removes changedtick. It is better to
> make `free_options` a flag variable and avoid calling
> buf_init_changedtick() based on some flag there: current workflow
> looks weird as it first removes `b:changedtick`, then re-adds it
> by calling buf_init_changedtick(), then remove again.
> Also based on my understanding it looks logical to not remove
> `b:changedtick`, but to *replace* it with something allocated if
> needed based on examining reference count before calling
> `unref_var_dict`. Because now you have key disappearing from
> dictionary for no good reason.
Patch-By: Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>
|
|
|
|
|
|
| |
Problem: Floating point exception with "%= 0" and "/= 0".
Solution: Avoid dividing by zero. (Dominique Pelle, closes vim/vim#4058)
https://github.com/vim/vim/commit/e21c1580b7acb598a6e3c38565434fe5d0e2ad7a
|
|
|
|
| |
Despite the PVS warning, we do not want to conflate these
cases, they are semantically different.
|
|
|
|
|
|
| |
Problem: Lock flag in new dictitem is reset in many places.
Solution: Always reset the lock flag.
https://github.com/vim/vim/commit/c89d4b35300b98cf68b14c89c8e1add51bd857e3
|
|
|
|
|
|
|
|
| |
Problem: ":profdel func" does not work if func was called already.
(Dominique Pelle)
Solution: Reset uf_profiling and add a flag to indicate initialization was
done.
https://github.com/vim/vim/commit/ad6480961080f80a455b2394f27b02935a2ded52
|
|
|
|
|
|
| |
Problem: Incomplete set of assignment operators.
Solution: Add /=, *= and %=. (Ozaki Kiichi, closes vim/vim#3931)
https://github.com/vim/vim/commit/ff697e6cef8ced7717a21fd525ab3200b2f1724f
|
|
|
|
|
|
| |
Problem: swapinfo() leaks memory.
Solution: Avoid allocating the strings twice.
https://github.com/vim/vim/commit/e6fdf79980c0f2856700d4f46de700293f477429
|
|
|
|
|
|
|
| |
ref #343
Though I don't see a strong benefit, it isn't too much of a burden, and
maybe avoids confusion in some cases.
|
|
|
|
|
|
|
|
|
|
|
|
| |
closes #8274
The parent commit tries a different approach, but that fails on Apple
Clang version:
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
which somehow compiles the check_c_source_compiles() check, but then
complains during later compilation that __fpclassify is not defined
(regardless of "#include <math.h>").
|
|
|
|
|
|
|
|
|
|
|
|
| |
closes #8274
- Instead of #undef and re-#define, define "xfoo" wrappers to avoid
include-order sensitivity.
- The warnings are bogus, caused by bad interaction between glibc and
clang 6+.
- https://bugs.llvm.org/show_bug.cgi?id=35268
- https://bugs.llvm.org/show_bug.cgi?id=39738
- https://bugzilla.redhat.com/show_bug.cgi?id=1472437
|
|
|
|
|
|
|
|
|
|
| |
Note about shada.c:
- shada_read_next_item_start was intentionally shadowing `unpacked` and
`i` because many of the macros (e.g. ADDITIONAL_KEY) implicitly
depended on those variable names.
- Macros were changed to parameterize `unpacked` (but not `i`). Macros
like CLEAR_GA_AND_ERROR_OUT do control-flow (goto), so any other
approach is messy.
|
|
|
|
|
|
|
| |
Problem: Get_tv function names are not consistent.
Solution: Rename to tv_get.
https://github.com/vim/vim/commit/d155d7a8519987361169459b8d464ae1caef5e9c
Only a change in comments appears to be necessary.
|
|
|
|
|
|
|
| |
In file included from ../src/nvim/eval/encode.c:974:
../src/nvim/eval/typval_encode.c.h:390:40: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
do { if ((tv->vval.v_special == kSpecialVarTrue)) { msgpack_pack_true(packer); } else { msgpack_pack_false(packer); } } while (0);
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
| |
`tv` is passed to the TYPVAL_ENCODE_CONV_FUNC_BEFORE_* macros, which
don't appear to actually use that parameter.
Found by clang scan-build 5.0
|
|
|
|
|
|
| |
Problem: Padding in list type wastes memory.
Solution: Reorder struct members to optimize padding. (Dominique Pelle,
closes vim/vim#2704)
https://github.com/vim/vim/commit/1a840240376f2858d489736f9eed6d2975225fdf
|
|
|
|
|
|
|
|
|
|
| |
src/nvim/eval/typval.c
src/nvim/fileio.c
src/nvim/main.c
src/nvim/regexp_nfa.c
src/nvim/spellfile.c
changed some EMSG[..] Macros to emsgf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
log.c
message.c
strings.c
fixed some printf warnings in:
src/nvim/undo.c
src/nvim/eval.c
src/nvim/eval/encode.c
src/nvim/eval/typval.c
src/nvim/ex_getln.c
src/nvim/fileio.c
src/nvim/lua/executor.c
src/nvim/main.c
src/nvim/regexp_nfa.c
src/nvim/shada.c
src/nvim/spellfile.c
src/nvim/tui/terminfo.c
src/nvim/garray.h
|
|
|
|
|
|
|
|
| |
ref https://github.com/neovim/neovim/issues/9001#issuecomment-421843790
Steps to reproduce:
:set verbose=9
:call system(['echo'])
E730: using List as a String
|
|
|
|
|
| |
Problem: Duplication of code for adding a list or dict return value.
Solution: Add rettv_dict_set() and rettv_list_set(). (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/45cf6e910c6d162775ca9d470fac4b6db844001f
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
These kinds of warnings are inevitable for generic macros.
|
|
|
|
|
|
| |
For the case of TV_DICTITEM_STRUCT, we can't just pass `1` because:
https://github.com/neovim/neovim/pull/8142#discussion_r175262436
> this variant will trigger array overrun warnings from various static analyzers.
|
|\ |
|
|/ |
|
|\
| |
| | |
Add a way to collect list usage statistics
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New logging is guarded by cmake LOG_LIST_ACTIONS define. To make it more
efficient it is allocated as a linked list with chunks of length
2^(7+chunk_num); that uses basically the same idea as behind increasing kvec
length (make appending O(1) (amortized)), but reduces constant by not bothering
to move memory around what realloc() would surely do: it is not like we need
random access to log entries here to justify usage of a single continuous memory
block.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** CID 169163: Null pointer dereferences (FORWARD_NULL)
/src/nvim/eval/decode.c: 290 in decode_string()
284 if (elw_ret == -1) {
285 tv_clear(&tv);
286 return (typval_T) { .v_type = VAR_UNKNOWN, .v_lock = VAR_UNLOCKED };
287 }
288 return tv;
289 } else {
>>> CID 169163: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "s" to "xmemdupz", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.)
290 return (typval_T) {
291 .v_type = VAR_STRING,
292 .v_lock = VAR_UNLOCKED,
293 .vval = { .v_string = (char_u *)(
294 s_allocated ? (char *)s : xmemdupz(s, len)) },
295 };
|
|
|
|
|
|
|
|
|
| |
Clang static analyzer had trouble with filter_map in eval.c because
tv_copy could, in principle, change the v_type of argvars[0]. It
saw a potential null pointer going somewhere it shouldn't as a result.
The from argument in tv_copy should be const, which also cleans up the
static analyzer's complaint.
|
| |
|
| |
|
|
|
|
|
| |
There is nothing wrong with them, just it is generally better to remove
a range then to remove items individually.
|
|
|
| |
tv_list_remove_items() may cause confusion with tv_list_item_remove()
|
| |
|
| |
|
|
|
|
| |
Better write this bit in lua then make reviewers or clint filter out
tv_list_item_alloc().
|
|
|
|
| |
Still left calls in eval/typval.c and test/unit/eval/helpers.lua. Latter is the
only reason why function did not receive `static` modifier.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot make Vim fail on an internal error.
Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an
internal error without mentioning where.
https://github.com/vim/vim/commit/95f096030ed1a8afea028f2ea295d6f6a70f466f
Signed-off-by: Michael Schupikov <michael@schupikov.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* typval_encode.c.h: avoid -Wnonnull-compare warning
closes #6847
The NULL check is needed because TYPVAL_ENCODE_CONV_EMPTY_DICT may be
invoked with literal `NULL`.
Warning occurs even for `Debug` build-type:
neovim/src/nvim/eval/typval.c: In function ‘_typval_encode_nothing_convert_one_value’:
neovim/src/nvim/eval/typval.c:1802:10: warning: nonnull argument ‘tv’ compared to NULL [-Wnonnull-compare]
if (tv != NULL) { \
^
../src/nvim/eval/typval_encode.c.h:398:9: note: in expansion of macro ‘TYPVAL_ENCODE_CONV_EMPTY_DICT’
TYPVAL_ENCODE_CONV_EMPTY_DICT(tv, tv->vval.v_dict);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc version:
gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
* fixup! typval_encode.c.h: avoid -Wnonnull-compare warning
|