| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| | |
Simplify method of determining search position of the extension.
|
| | |
|
| | |
|
| |
| |
| |
| | |
fixes #9403
|
| | |
|
|/
|
|
|
| |
Qualified (i.e. dot-prefixed) relative paths should only search CWD, not
$PATH.
|
|
|
|
|
|
|
|
|
|
| |
S_IXUSR does not check ownership. Test case:
touch test.txt
chmod 744 test.txt
sudo chown root:root test.txt
nvim -u NORC
:echo executable('./test.txt')
|
|
|
|
| |
fixes #9655
|
|
|
| |
Since libuv minimum version is now v1.12, we can use libuv's impl.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Notable changes since v1.23.2:
- v1.26.0
- uv_os_uname()
- unix: don't attempt to invalidate invalid fd
https://github.com/libuv/libuv/commit/1ce6393a5780538ad8601cae00c5bd079b9415a9
- v1.25.0
- unix: better handling of unsupported F_FULLFSYNC (fixes #6725)
https://github.com/libuv/libuv/commit/6fc797c3fe18d8df71b36ecf2184f085c0283251
- tty,win: fix Alt+key under WSL
https://github.com/libuv/libuv/commit/d2e59bb6003d707bdebd7a381f5a7e1d0cc3fd3b
- fsevents: really watch files with fsevents on macos 10.7+
https://github.com/libuv/libuv/commit/2d2af382ce84b91d6ee7a185af32fca7f0acd84b
- win: fix duplicate tty vt100 fn key
- v1.24.0
- win,fs: retry if uv_fs_rename fails
https://github.com/libuv/libuv/commit/e94c184c7c4a18f3de569c97caeb83f4ff98a4b2
- later [reverted](https://github.com/libuv/libuv/issues/2098) but may be useful reference
- win: support more fine-grained windows hiding
https://github.com/libuv/libuv/commit/4c2dcca27b80945d6b7063f0ea031b8a75a46a52
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
macOS: Try direct fsync() if F_FULLFSYNC fails.
closes #6725
ref https://github.com/vim/vim/pull/4016
vim-patch:8.1.0957
> on macOS F_FULLFSYNC fails with ENOTSUP for unsupported storage systems
> (e.g. SMB), though this is not documented in the Apple fcntl man page.
libuv fixed this in v1.25.0:
https://github.com/libuv/libuv/commit/6fc797c3fe18d8df71b36ecf2184f085c0283251
|
|
|
|
|
|
|
| |
* os/fs.c: add os_isdir_executable()
* eval.c: fix hang on job start caused by non-executable cwd option
* channel.c: assert cwd is an executable directory
* test: jobstart() produces error when using non-executable cwd
|
|
|
|
| |
wchar_t has better cross-platform support and seems to fix an issue
on MinGW when building with `-std=c99`.
|
|\
| |
| | |
closes #4983
|
| |
| |
| |
| | |
It is not possible to enter while loop body with unsigned2 == 0 if loop
condition requires unsigned1 < unsigned2.
|
| |
| |
| |
| | |
Use it to verify fsync() behavior.
|
|\| |
|
| | |
|
| |\ |
|
| | | |
|
| |/ |
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make the Windows impl closer to Vim os_win32.c, and the Unix impl closer
to Vim os_unix.c.
Outcomes:
- Do not send negative fd to close(). ref #4806 #4772 #6860
- Fallback return-value is now correct in (hopefully) all cases.
- unix: check S_ISXXX instead of relying on os_open (which can fail for
irrelevant reasons). buf_write() expects NODE_WRITABLE for character
devices such as /dev/stderr. 96f834a8424e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
EINVAL (instead of EFAULT) because that's what glibc does:
https://github.com/bminor/glibc/blob/master/io/open.c#L35
os_nodetype: check for UV_EINVAL explicitly.
ref #4370
ref https://github.com/neovim/neovim/issues/4370#issuecomment-344366571
ref ac055d677aa9eff9fca11cecb5ac7f7a4edb0265
ref #4772
|
| |
| |
| |
| | |
References ac055d677aa9
References #4370
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes #4370
Explication:
In the backtrace in #4370, we see that `buf_write()` was called with
non-NULL `fname` and `sfname` arguments, but they've since _become_
NULL.
#7 0x00000000004de09d in buf_write (buf=0x1dee040, fname=0x0, fname@entry=0x1e985b0 "/home/sean/src/github.com/snczl/virta/pkg/meld/segment.go",
sfname=0x0, sfname@entry=0x1ddfa60 "segment.go", start=1, end=72, eap=eap@entry=0x7ffc6b032e60, append=0,
forceit=0, reset_changed=1, filtering=0)
at /home/travis/build/neovim/bot-ci/build/neovim/src/nvim/fileio.c:2576
This is most likely due to the code that restores those values from
`buf`, which happens just before the fatal call to `os_fileinfo`
```c
/*
* The autocommands may have changed the name of the buffer, which may
* be kept in fname, ffname and sfname.
*/
if (buf_ffname)
ffname = buf->b_ffname;
if (buf_sfname)
sfname = buf->b_sfname;
if (buf_fname_f)
fname = buf->b_ffname;
if (buf_fname_s)
fname = buf->b_sfname;
```
It's worth noting that at this point `ffname` is still non-NULL, so
it _could_ be used. However, our current code is purely more strict
than Vim in this area, which has caused us problems before (e.g.,
`getdigits()`). The commentary for `struct file_buffer` clearly
indicate that all of `b_ffname`, `b_sfname`, and `b_fname` may be
NULL:
```c
/*
* b_ffname has the full path of the file (NULL for no name).
* b_sfname is the name as the user typed it (or NULL).
* b_fname is the same as b_sfname, unless ":cd" has been done,
* then it is the same as b_ffname (NULL for no name).
*/
char_u *b_ffname; /* full path file name */
char_u *b_sfname; /* short file name */
char_u *b_fname; /* current file name */
```
Vim directly calls `stat(2)` which, although it is annotated to tell
the compiler that the path argument is non-NULL, does handle a NULL
pointer by returning a `-1` value and setting `errno` to `EFAULT`.
This satisfies Vim's check, since it treats any `-1` return from
`stat(2)` to mean the file doesn't exist (at least in this code
path).
Note that Vim's mch_stat() implementations on win32 and solaris
clearly cannot accept NULL `name`. But the codepaths that call
mch_stat will NULL `name` tend to be unix-only (eg: u_read_undo)!
|
| |
| |
| |
| |
| |
| |
| | |
This was broken in ye olde refactor from 2014:
e85fe0957d40080f43cbfcbe9eb8864475325b09
References #4370
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
If procfs is missing then libuv cannot find the exe path.
Fallback to path_guess_exepath(), adapted from Vim findYourself().
Closes #6734
|
| |
| |
| |
| | |
If the CWD contains a directory with the literal name "~" then the tests
will have bogus failures.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Function was renamed and changed to return `const char *`.
|
| | |
|
|/
|
|
|
| |
This variant uses `fdopen()` which is not standard, but it fixes problem on my
system. In next commit `scriptin` will use `FileDescriptor*` from os/fileio in
place of `FILE*`.
|
|
|
|
| |
Also: skip Test_undo_del_chars the right way. #6287
|
|
|
|
|
| |
Before this change, new processes started with libuv prevented SIGHUP
from reaching pty processes (by keeping the ptmx file descriptor open).
|
| |
|
| |
|
|
|
|
| |
Absolute path is considered executable even *without* an extension.
|
|
|
|
|
|
|
|
| |
This allows executables to be found by :!, system(), and executable() if
they live next to ("sibling" to) nvim.exe. This is what gvim on Windows
does, and also matches the behavior of Win32 SearchPath().
https://github.com/vim/vim/blob/c4a249a736d40ec54794827ef95804c225d0e38f/src/os_win32.c#L354-L370
|
|
|
|
|
| |
Windows: prepend `".;"` to PATH, as Vim does.
https://github.com/vim/vim/blob/c4a249a736d40ec54794827ef95804c225d0e38f/src/os_win32.c#L1916
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Windows we cannot rely on absolute install paths to point to the
location of the runtime. Vim uses the path of the current binary as
a possible location for the runtime folder. In Neovim the install
location places the runtime folder in ../share/nvim/runtime.
In Vim this logic is guarded by USE_EXE_NAME, which is defined for win32
and macOS.
TODO: We may need to incorporate similar logic for macOS:
https://github.com/vim/vim/blob/0cdb72aa38c4a0140c94d56bf8bc17cb30260ebf/src/misc1.c#L4287-L4308
|
|
|
|
|
| |
Closes #5267
Helped-by: oni-link <knil.ino@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
move `call_shell` to misc1.c
Move some fns to state.c
Move some fns to option.c
Move some fns to memline.c
Move `vim_chdir*` fns to file_search.c
Move some fns to new module, bytes.c
Move some fns to fileio.c
|
|
|
|
|
|
| |
Wrap up uv_translate_sys_error and fallbacks into a new function
os_translate_sys_error(). In windows a copy of the original
uv_translate_sys_error() was imported from libuv.
|
| |
|
| |
|