Age | Commit message (Collapse) | Author |
|
Problem: gcc overflow-warning for f_resolve
Solution: use pointer p instead of pointer q[-1]
Suppress the following warning:
```
filepath.c: In function ‘f_resolve’:
filepath.c:2162:27: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
2162 | q[-1] = NUL;
```
Closes: #13352
closes: #13353
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
|
|
Problem: Fix regression in {func} argument of reduce()
Solution: pass function name as string again
Before patch 9.0.0548, passing a string as {func} argument of reduce()
is treated as a function name, but after patch 9.0.0548 it is treated as
an expression instead, which is useless as reduce() doesn't set any v:
variables. This PR restores the behavior of {func} before that patch.
Also correct an emsg() call, as e_string_list_or_blob_required doesn't
contain format specifiers.
closes: #12824
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
Problem: Buffer overflow when expanding long file name.
Solution: Use a larger buffer and avoid overflowing it. (Yee Cheng Chin,
closes #12201)
|
|
Problem: find_file_in_path() is not reentrant.
Solution: Instead of global variables pass pointers to the functions.
(closes #12093)
|
|
Problem: Completion of :runtime does not handle {where} argument.
Solution: Parse the {where} argument. (closes #11863)
|
|
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11792)
|
|
Problem: readblob() always reads the whole file.
Solution: Add arguments to read part of the file. (Ken Takata,
closes #11402)
|
|
Problem: browse() first argument cannot be a bool.
Solution: Use tv_get_bool_chk() instead of tv_get_number_chk().
(closes #11308)
|
|
Problem: Evaluating "expr" options has more overhead than needed.
Solution: Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr',
"expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr',
'formatexpr', 'indentexpr' and 'charconvert'.
|
|
Problem: Calling function for reduce() has too much overhead.
Solution: Do not create a funccall_T every time.
|
|
Problem: Only created files can be cleaned up with one call.
Solution: Add flags to mkdir() to delete with a deferred function.
Expand the writefile() name to a full path to handle changing
directory.
|
|
Problem: Cleaning up after writefile() is a hassle.
Solution: Add the 'D' flag to defer deleting the written file. Very useful
in tests.
|
|
Problem: Expanding ":e %" does not work for remote files.
Solution: If the "%" or "#" file does not exist add the expansion anyway.
|
|
Problem: Error message for list argument could be clearer.
Solution: Include the argument number. (Yegappan Lakshmanan, closes #11027)
|
|
Problem: Irix systems no longer exist.
Solution: Remove references to Irix. (Yegappan Lakshmanan, closes #10994)
|
|
Problem: The +wildignore feature is nearly always available.
Solution: Graduate +wildignore for consistency.
|
|
Problem: No good reason why the "gf" command is not in the tiny version.
Solution: Graduate the file_in_path feature.
|
|
Problem: Expanding "**" may loop forever with directory links.
Solution: Check for being interrupted. (closes #10946)
|
|
Problem: Too many type casts for dict_get functions.
Solution: Change the key argument from "char_u *" to "char *".
|
|
Problem: MS-Windows: tests fail if there is a stray "runtime" directory.
Solution: Only use a "runtime" directory if it contains "defaults.vim".
|
|
Problem: Various small issues.
Solution: Various small improvments.
|
|
Problem: Various warnings from clang on MS-Windows.
Solution: Avoid the warnings. (Yegappan Lakshmanan, closes #10553)
|
|
Problem: Expanding path with "/**" may overrun end of buffer.
Solution: Use vim_snprintf().
|
|
Problem: Various white space and cosmetic mistakes.
Solution: Change spaces to tabs, improve comments.
|
|
Problem: Empty string considered an error for expand() when 'verbose' is
set. (Christian Brabandt)
Solution: Do not give an error for an empty result. (closes #10307)
|
|
Problem: Checking for absolute path is not trivial.
Solution: Add isabsolutepath(). (closes #10303)
|
|
Problem: Verbose check with dict_find() to see if a key is present.
Solution: Add dict_has_key(). (Yegappan Lakshmanan, closes #10074)
|
|
Problem: Cannot have expandcmd() give an error message for mistakes.
Solution: Add an optional argument to give errors. Fix memory leak when
expanding files fails. (Yegappan Lakshmanan, closes #10071)
|
|
Problem: 'wildignorecase' is sometimes not used for glob().
Solution: Also use 'wildignorecase' when there are no wildcards.
(closes #10066, closes #8350)
|
|
Problem: "import autoload" does not check the file name.
Solution: Give an error if the file is not readable. (closes #10049)
|
|
Problem: Filename modifer ":8" removes the filename.
Solution: Use strncpy() instead of vim_strncpy(). (Christian Brabandt,
closes #9918, closes #8600)
|
|
Problem: Crash when using special multi-byte character.
Solution: Don't use isalpha() for an arbitrary character.
|
|
Problem: Part of condition is always true.
Solution: Remove that part of the condition. (closes #9729)
|
|
Problem: Warnings reported by MSVC.
Solution: Rename variables and other fixes. (Ken Takata, closes #9689)
|
|
Problem: The EBCDIC support is outdated.
Solution: Remove the EBCDIC support.
|
|
Problem: Using uninitialized memory when reading empty file.
Solution: Check for empty file before checking for NL. (Dominique Pellé,
closes #9511)
|
|
Problem: Using int for second argument of ga_init2().
Solution: Remove unnessary type cast (int) when using sizeof().
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
|
|
Problem: getcwd() is unclear about how 'autochdir' is used.
Solution: Update the help for getcwd(). Without any arguments always return
the actual current directory. (closes #9142)
|
|
Problem: Vim9: runtime and compile time type checks are not the same.
Solution: Add more runtime type checks for builtin functions. (Yegappan
Lakshmanan, closes #8646)
|
|
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks. Sort the argument lists.
(Yegappan Lakshmanan, closes #8626)
|
|
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks. (Yegappan Lakshmanan, closes #8611)
|
|
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks, also at runtime. (Yegappan
Lakshmanan, closes #8587)
|
|
Problem: Vim9: argument types are not checked at compile time.
Solution: Add more type checks. (Yegappan Lakshmanan, closes #8560)
|
|
Problem: Error messages are spread out.
Solution: Move some error messages to errors.h. Use clearer names.
|
|
Problem: Tests failing because there is no error for float to string
conversion.
Solution: Change the check for failure to check for correct result. Make
some conversions strict in Vim9 script.
|
|
Problem: Vim9: not enough function arguments checked for string.
Solution: Check in ch_logfile(), char2nr() and others.
|