| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| | |
Enable and fix bugprone-misplaced-widening-cast warning.
Fix some modernize-macro-to-enum and readability-else-after-return
warnings, but don't enable them. While the warnings can be useful, they
are in general too noisy to enable.
|
|/
|
|
|
|
|
|
|
|
|
| |
- `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if
they do not exist
- Note: `:foo ++…` is usually for options. No existing options have
a single-char abbreviation (presumably by design), so it's safe to
special-case `++p` here.
- Same for `writefile(…, 'foo/bar/baz.txt', 'p')`
- `BufWriteCmd` can see the ++p flag via `v:cmdarg`.
closes #19884
|
|
|
|
|
|
|
| |
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and
others.
Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the
GUI build. (Hirohito Higashi, closes vim/vim#3932)
https://github.com/vim/vim/commit/4f97475d326c2773a78561fb874e4f23c25cbcd9
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
| |
* refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
| |
This reverts commit c4c74c3883aa3122c0c877ca8dd7b26beb5cc4aa.
LibUV already gives an error for this, so this isn't needed.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
| |
vim-patch:8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
- Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG
spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which
implies that XDG_STATE_DIR is potentially non-local.
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Store sockets in stdpath('run') ($XDG_RUNTIME_DIR).
- Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims.
- Make ok() actually useful.
- Introduce assert_nolog().
closes #3517
closes #17093
|
| |
|
|
|
| |
Closes https://github.com/neovim/neovim/issues/6297
|
| |
|
| |
|
|
|
|
|
| |
Possibly dialog code is messages.c could be moved here as well.
misc1.c is now empty, so delete it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
| |
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: format with uncrustify
* fixup(dundar): fix functions comments
* fixup(dundar): remove space between variable and ++/--
* fixup(dundar): better workaround for macro attributes
This is done to be able to better use uncrustify rules for macros
* fixup(justin): make preprocessors follow neovim style guide
|
| |
|
| |
|
|
|
|
|
|
| |
If the O_* flags were non-zero, then ORing the flags would always be
true. However, the O_* flags aren't guaranteed to be non-zero, so the
assert is invalid in the first place.
|
|\ |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zero out the caller's FileInfo in all the functions which populate the
struct. The contents are considered private, so we need to ensure
it's initialized.
If the stat call fails, the buffer we get back from libuv may not have
any valid data in it, so don't copy it into the caller's FileInfo.
This was happening, expectedly, in functional/ex_cmds/write_spec.lua's
"write errors out correctly", which caused it to fail in certain
environments:
test/functional/ex_cmds/write_spec.lua:130: Expected objects to be the same.
Passed in:
(string) 'Vim(write):E212: Can't open file for writing: not a directory'
Expected:
(string) 'Vim(write):E166: Can't open linked file for writing'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
../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
- return libuv error code
- handle error in caller only (avoid redundant messages)
https://github.com/libuv/libuv/commit/53995a3825d23eacd01e2bcfa35642c4a188d32b
https://github.com/libuv/libuv/commit/4c945f49365ab4d6e1b07bf0ef2893455dc04622
|
|
|
|
|
|
|
|
|
|
| |
- take a size parameter
- always NUL-terminate the result
- return libuv error code
- handle error in caller only (avoid redundant messages)
https://github.com/libuv/libuv/commit/53995a3825d23eacd01e2bcfa35642c4a188d32b
https://github.com/libuv/libuv/commit/4c945f49365ab4d6e1b07bf0ef2893455dc04622
|
|
|
|
|
|
|
| |
Windows: Using fopen() directly may need UTF-16 filepath conversion. To
achieve that, os_fopen() goes through os_open().
fix #10586
|
|
|
|
|
|
|
|
| |
Problem: Exepath() doesn't work for "bin/cat".
Solution: Check for any path separator. (Daniel Hahler, closes vim/vim#4724,
closes vim/vim#4710)
https://github.com/vim/vim/commit/d08b8c4c04db9433340df38d21f0e26878f28421
Fixes https://github.com/neovim/neovim/issues/10554.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows: In order for jobstart(['foo']), system(['foo']) to find
"foo.cmd", we must replace "foo" with "foo.cmd" before sending `argv` to
process_spawn().
Rationale: jobstart([…]), system([…]) "executable" semantics should be
consistent with the VimL executable() function.
fix #9569
related: #10554
|
|
|
|
|
|
|
|
| |
* Fix problem that 1byte extra memory was allocated in is_executable_in_path
* Revert "Revert "tests: executable_spec: enable pending test #10443" (#10454)"
This reverts commit 13fbeda0e56db36aeeb865bb5b33d13f69b2fdbc.
|
|
|
|
|
|
|
|
|
|
|
| |
Fix issue that increment expression is executable and pointer ext
pointing out of the buffer, if the pointer ext points to the terminating
NUL.
* Change termination condition judgment to one place
* Change first condition judgment
Change to not evaluate *(ext -1) in the first condition judgment.
* Change to use copy_option_part instead of STRLCPY
|
|
|
| |
Introduce os_file_settime(), remove cruft.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Restores code removed in #9709.
uv_fs_copyfile() copies the perm bits but not the group name.
https://github.com/libuv/libuv/pull/1547
ref #9709
ref #8288
|
|\
| |
| |
| | |
ref #8288
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
- Corresponds to the case where pathext contains a zero-length
extension.
- Remove unnecessary break statements.
- Fix function attributes.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
- Fix the problem of checking the extension in a UNIX like shell.
- Fix the problem of not checking the existence of the file when the
pathext contains an extension.
|
| |
| |
| |
| | |
Add this functionality to is_executable_ext() instead.
|
| |
| |
| |
| | |
mch_expand_wildcards does it this way, it's probably good enough.
|