../src/nvim/os/fs.c: In function 'os_can_exe':
../src/nvim/os/fs.c:247:27: warning: passing argument 1 of 'is_executable_ext' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
247 | if (is_executable_ext(name, abspath)) {
| ^~~~
In file included from ../src/nvim/os/fs.c:36:
src/nvim/auto/os/fs.c.generated.h:7:38: note: expected 'char *' but argument is of type 'const char *'
7 | static _Bool is_executable_ext(char *name, char **abspath) FUNC_ATTR_NONNULL_ARG(1);
| ~~~~~~^~~~
../src/nvim/os/fs.c: In function 'os_resolve_shortcut':
../src/nvim/os/fs.c:1183:56: warning: conversion from 'size_t' {aka 'const long long unsigned int'} to 'int' may change value [-Wconversion]
1183 | const int conversion_result = utf8_to_utf16(fname, len, &p);
| ^~~
../src/nvim/os/fs.c:1211:19: warning: declaration of 'conversion_result' shadows a previous local [-Wshadow]
1211 | const int conversion_result = utf16_to_utf8(wsz, -1, &rfname);
| ^~~~~~~~~~~~~~~~~
../src/nvim/os/fs.c:1183:15: note: shadowed declaration is here
1183 | const int conversion_result = utf8_to_utf16(fname, len, &p);
| ^~~~~~~~~~~~~~~~~
- take a size parameter
- always NUL-terminate the result
- return libuv error code
- handle error in caller only (avoid redundant messages)
53995a38254c945f4936
The screen resize logic needs to be refactored to be simpler and more
deterministic. Until then, we need to handle attempts to draw outside of the
screen size gracefully, just like the old vim code did.
fixes#9989
If parse_shape_opt() is done before user config, the TUI may cause
unwanted changes to the terminal cursor which cannot later be undone
(see #4396).
fix#10750
Problem: Test listed as flaky should no longer be flaky.
Solution: Remove Test_popup_and_window_resize from the list of flaky tests.
(Daniel Hahler, closevim/vim#4807)
9570aacdb8
Problem: Test_popup_and_window_resize() does not always pass.
Solution: Do not use $VIMPROG, pass the Vim executable in the vimcmd file.
(Ozaki Kiichi, closesvim/vim#2186)
631820536e
vim-patch:8.0.1526: no test using a screen dump yet
Problem: No test using a screen dump yet.
Solution: Add a test for C syntax highlighting. Add helper functions.
da65058a9c
NOTE: uses modified `GetVimProg()` (which is used with skipped tests only
(mostly because of `!has('terminal')`)).
Vim uses a 'vimcmd' file, while Nvim uses `$NVIM_TEST_ARGX` environment
variables.
Ref: https://github.com/vim/vim/pull/4806
Before this commit, when `inccomand` was set to `nosplit`, multi-line
substitutions collapsed the command-line.
This happened because when ex_getln.c:cursorcmd() computed a msg_row, it
was given a cmdline_row one line too high. This happened because
message.c:msg_puts_display() was supposed to decrement cmdline_row but
didn't, because of the `msg_no_more && lines_left == 0` check placed
just before the decrementation part in msg_puts_display's while loop.
Every time msg_puts_display writes a line, it decreases `lines_left` (a
variable used to know how many lines are left for prompts). Since
redrawcommandline() did not reset `lines_left` between calls to
msg_puts_display, every time a character was pressed, `lines_left` was
decremented. This meant that once the user pressed COLUMNS+ROWS numbers
of characters, `lines_left` would reach 0 and prevent msg_row from being
decremented.
It makes sense to fix setting `lines_left` to `cmdline_row` in
`compute_cmdrow` ; after all, computing where the command line row
should be placed is equivalent to computing how many `lines_left` of
output there are left.
Closes#8254.
- Re-enable Test_BufLeave_Wipe. 66f5e5c7d7
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: Crash when wiping out a buffer after using getbufinfo().
(Yegappan Lakshmanan)
Solution: Remove b:changedtick from the buffer variables.
(Note: The test changes in vim-patch:8.0.1193 were already included.)
- Windows: `set FOO=` deletes environment variable FOO, and there is no
way to set empty string expect by calling the API.
- Vim-compatible: `:let $FOO=""` deletes the environment variable.
- See also Test_WindowsHome().
ref: https://github.com/neovim/neovim/pull/10657#issuecomment-516368089
Problem: Tests do not run or are not reliable on some systems.
Solution: Use "findstr" instead of "grep" on MS-Windows. Clear
PROMPT_COMMAND in the terminal test. Delete temp file. Wait for
output after executing a debug command. (Yegappan Lakshmanan,
closesvim/vim#4479)
ddd3308782
Ignored changes to testdir/test_terminal.vim.
Problem: In screen.c grid_char_needs_redraw clang warns
that grid->chars could be NULL
Solution: Suggested by bfredl. Add explicit check
grid->chars != NULL in grid_put_linebuf
similar to grid_puts_len
`len` is used with `list_append_string` later, and should reflect the
length of `word` (i.e. 0 when not setting word / breaking above).
Ref: neovim/neovim#9782 (comment)
Regressed in e134cc9d4a: the use of list_in_columns was not adding a
space after the first features, because we do not start on a new line:
> Features: -acl+iconv +tui
This moves all the related code to `list_features`, and just joins them
with spaces.
Problem: There is no easy way to manipulate environment variables.
Solution: Add environ(), getenv() and setenv(). (Yasuhiro Matsumoto,
closesvim/vim#2875)
691ddeefb5
Suppress the warning.
mb_c and mb_l describe a char together, they are not independent variables. The
coupled assignments are good practice to avoid future confusion, even if the
current code doesn't use an assigned value.
Problem: Json_encode() is very slow for large results.
Solution: In the growarray use a growth of at least 50%. (Ken Takata,
closesvim/vim#4461)
c47ed44be7
Problem: Aborting an autocmd with an exception is not tested.
Solution: Add a test. Also shows how to abort a command by throwing an
exception.
23b5139234
Instead of deciding provider status in eval_has_provider, move the
decision to the provider Vim scripts.
Previously, provider loading worked as follows:
1. eval_has_provider() verified provider availability by searching for
the provider#providername#Call function and cached this verificaion as a static
variable for some providers
2. providers short-circuited on loading to prevent the definition of the
Call function (with the exception of the node provider that did not)
This commit changes the expected interface between nvim and its
providers to facilitate provider reloading, by splitting the
verification of the provider from the availability of the Call function.
eval_has_provider() now checks for a provider#providername#enabled
variable. It is up to the provider script to set this to 0 or 1
accordingly. eval_call_provider() remains unchanged.
All providers hosting a Call function were updated to respect this.
The clipboard provider now has a Reload function to reload the
provider.
This is clearer/more explicit and avoids potential mismatch between what unibilium thinks vs what Nvim thinks.
For reference: e3b16d6219/uniutil.c (L203-L211)
Patch 8.1.1379 includes a change to a test, added in Patch 8.1.0815.
Patch 8.1.0815 includes runtime doc changes to Blob.
Neovim does not support Blobs yet.
Problem: Warning for file no longer available is repeated every time Vim is
focused. (Brian Armstrong)
Solution: Only give the message once. (closesvim/vim#4748)
674e2bde6e
It should be done for timeouts only (-1, not != -1), but the job is
stopped via `:bwipeout!` already also in that case.
Fixes E900 with timing out tests:
"test_xxx.tlog" "test_xxx.tlog" [New] 183L, 13375C written
Error detected while processing function Main:
line 37:
E900: Invalid channel id================================================================================
Problem: unreliable types for complete function arguments
Solution: fix argument type for functions w/ unreliable type conversion(Ozaki Kiichi)
vim/vim#2993
Problem: Too many curly braces.
Solution: Remove curly braces where they are not needed. (Hirohito Higashi,
closesvim/vim#3982)
abab0b0fdd
Neovim code style requires the opposite.
Add curly braces to minimize lint errors when applying Vim patches.
Problem: When user tries to exit with CTRL-C message is confusing.
Solution: Only mention ":qa!" when there is a changed buffer. (closesvim/vim#4163)
a84a3dd663
vim-patch:8.1.1052: test for CTRL-C message sometimes fails
Problem: test for CTRL-C message sometimes fails
Solution: Make sure there are no changed buffers.
553e5a5c56
vim-patch:8.1.1053: warning for missing return statement
Problem: Warning for missing return statement. (Dominique Pelle)
Solution: Add return statement.
d6c3f1fa2b