| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
|
|
|
| |
fixes #7830 and #7788
|
|
|
|
|
|
|
|
|
| |
Test failure:
test/functional/eval/system_spec.lua: "works with an empty string"
E5677: Error writing input to shell-command: EPIPE
ref https://github.com/neovim/neovim/pull/6558#issuecomment-361061035
ref #6554
|
|\ |
|
| |
| |
| |
| | |
\zs.*/\=string(submatch(0))`
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
cb02137dfac7 had two mistakes, of the same nature: trans_special() must
be invoked with in_string=false unless the parsing context is a VimL
string. replace_termcodes() and input_enqueue() are low-level
mechanisms where VimL strings do not exist.
keymap.c: adjust double-quote case to satisfy keymap_spec.lua
closes #7410
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Mostly cargo-culting based on a reading of the manpages, interwebs, and
the Vim source.
|
|
|
|
|
|
|
|
|
| |
Unix's typical locale-related environment variables aren't always set
appropriately on a Mac. Instead of relying on them, query the locale
information using Mac specific APIs and then set $LANG appropriately for
the rest of nvim.
Closes #5873
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than enumerate predefines for all BSD systems, just rely on the
fact that they all "#define BSD" in sys/param.h.
Debian's GNU/kFreeBSD still requires its own check, since it isn't using
the BSD userspace.
References:
OpenBSD - https://github.com/openbsd/src/blob/210ebf9df0460bbdad02da9bbd5d859b61f57462/sys/sys/param.h#L40
FreeBSD - https://github.com/freebsd/freebsd/blob/f5d95e1f8d32db4ccccfd5ad9cecb21ed07a695d/sys/sys/param.h#L43
NetBSD - https://github.com/NetBSD/src/blob/ea620980793cf2011e5424f4a537b0488e3ffb4d/sys/sys/param.h#L49
DragonFlyBSD - https://github.com/DragonFlyBSD/DragonFlyBSD/blob/94ecf1295bb42b59772448d58ff40dd75c4a3ef8/sys/sys/param.h#L41
vim-patch:8.0.1357
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On startup, if running in a terminal, save the termios properties.
Use the saved termios for `:terminal` and `jobstart()` pty jobs.
This won't affect nvim spawned outside of a terminal.
questions:
- This affects `:terminal` and `jobstart({'pty':v:true})`.
Should we be more conservative for `jobstart({'pty':v:true})` (e.g.
pass NULL to forkpty() and let the OS defaults prevail)?
- Note: `iutf8` would not be set in that case.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- Make sure that proc->in is not NULL, because nvim crashed when
starting a job with pty.
- Make sure that proc->out is not NULL, because nvim crashed when stopping
a job opened with pty.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handling of process exit is still broken. It detects the moment when the
child process exits, then quickly stops polling for process output. It
should continue polling for output until the agent has scraped all of the
process' output. This problem is easy to notice by running a command like
"dir && exit", but even typing "exit<ENTER>" can manifest the problem --
the "t" might not appear.
winpty's Cygwin adapter handles shutdown by waiting for the agent to close
the CONOUT pipe, which it does after it has scraped the child's last
output. AFAIK, neovim doesn't do anything interesting when winpty closes
the CONOUT pipe.
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Before this change, if os_defs.h was included after macros.h then
win_defs.h would undefine our own RGB macro.
vim-patch:8.0.0146
|
|
|
|
|
|
|
|
|
|
| |
Coverity warning is a false positive: if rbuffer_read_ptr() returns
NULL then `cnt` is zero.
Revert 76ea97c809e50fccc5ca6615943ac6da1db1e030 (which caused
the TSan build to hang often--possibly because of the missing ui_flush()).
Instead, modify out_data_append_to_screen() to check for NULL.
ref #6862
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently on travis OS X systems it crashes when cleaning up streams with
stdout closed:
(lldb) bt all
* thread #1: tid = 0x0000, 0x00007fff8703df06 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGSTOP
* frame #0: 0x00007fff8703df06 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x00007fff93a764ec libsystem_pthread.dylib`pthread_kill + 90
frame #2: 0x00007fff97c056df libsystem_c.dylib`abort + 129
frame #3: 0x00007fff97bccdd8 libsystem_c.dylib`__assert_rtn + 321
frame #4: 0x0000000107a4e106 nvim`uv__close(fd=<unavailable>) + 102 at core.c:521
frame #5: 0x0000000107a5307d nvim`uv__loop_close(loop=0x00007fff5847c018) + 77 at loop.c:118
frame #6: 0x0000000107a4d149 nvim`uv_loop_close(loop=0x00007fff5847c018) + 57 at uv-common.c:626
frame #7: 0x000000010783e5bc nvim`stream_set_blocking(fd=0, blocking=true) + 204 at stream.c:34
frame #8: 0x000000010795d66b nvim`mch_exit(r=0) + 91 at os_unix.c:147
frame #9: 0x00000001078d5663 nvim`command_line_scan(parmp=0x00007fff5847c760) + 1779 at main.c:787
frame #10: 0x00000001078d4393 nvim`main(argc=2, argv=0x00007fff5847c898) + 163 at main.c:249
frame #11: 0x00007fff8cdd65ad libdyld.dylib`start + 1
frame #12: 0x00007fff8cdd65ad libdyld.dylib`start + 1
|
| |
|
|
|
|
| |
Code imported from #6299
|
| |
|
|
|
|
|
|
|
| |
rbuffer_read_ptr may return a null
if ptr == null && cnt == 0 && !out_data_decide_throttle(cnt)
then we would have called out_data_append_to_screen(ptr, cnt, eof)
which dereferences the null pointer.
|
| |
|
|
|
|
|
|
| |
- Establish ERROR log level as "critical". Such errors are rare and will
be valuable when users encounter unusual circumstances.
- Set -DMIN_LOG_LEVEL=3 for release-type builds
|
|
|
|
|
|
|
| |
From FreeBSD ports patch:
https://svnweb.freebsd.org/ports/head/editors/neovim/files/patch-src_nvim_os_pty__process__unix.c?revision=425833&view=markup
References https://github.com/neovim/neovim/issues/6771#issuecomment-302921368
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
If procfs is missing then libuv cannot find the exe path.
Fallback to path_guess_exepath(), adapted from Vim findYourself().
Closes #6734
|
| |
|
| |
|