- Create a private libuv loop instead of re-using uv_default_loop(), to
avoid conflict[1] with existing watcher(s) on the fd.
- Expose the global "input" fd as a getter instead of a mutable global.
[1] .deps/build/src/libuv/src/unix/core.c:833:
uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed.
If stdin is non-blocking, many tools (e.g. cat(1), read(1)) which assume
that stdin is blocking, will break in odd ways:
read: read error: 0: Resource temporarily unavailable
cat: -: Resource temporarily unavailable
rm: error closing file
libuv puts stdin in nonblocking mode, and leaves it that way at exit
(this is apparently by design). So, before this commit, this always
works (because the shell clobbers O_NONBLOCK):
$ nvim --cmd q
$ read
...but these forms do _not_ work:
$ nvim --cmd q && read
$ echo foo | nvim --cmd q && read
$ nvim && read
After this commit, all of the above forms work.
Background:
437b4397b9 (diff-41f4d294430cd8c36538999d62681ae2)https://github.com/fish-shell/fish-shell/issues/176#issuecomment-15800155
- bash (and other shells: zsh, tcsh, fish), upon returning to the
foreground, always sets fd 0 back to blocking mode. This practice only
applies to stdin, _not_ stdout or stderr (in practice these fds may be
affected anyways).
- bash/zsh/tcsh/fish do _not_ restore the non-blocking status of stdin
when _resuming a job_.
- We do _not_ save/restore the original flags visible to
fcntl(F_[SG]ETFL), because (counterintuitively) that isn't expected.
Helped-by: oni-link <knil.ino@gmail.com>
Closes#2086Closes#2377
---
Note: The following implementation of stream_set_blocking() was
discarded, because it resulted in a failed libuv assertion[1]:
int stream_set_blocking(int fd, bool blocking)
{
uv_pipe_t stream;
uv_pipe_init(uv_default_loop(), &stream, 0);
uv_pipe_open(&stream, fd);
int retval = uv_stream_set_blocking((uv_stream_t *)&stream, blocking);
uv_close((uv_handle_t *)&stream, NULL);
return retval;
}
[1] .deps/build/src/libuv/src/unix/core.c:833: uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed.
When maximizing the window, often only lines would be detected properly
with the `try_resize` handler being called immediately.
Fixes https://github.com/neovim/neovim/issues/2322.
Reviewed-by: Michael Reed <m.reed@mykolab.com>
Reviewed-by: Luke Andrew <luke.github@la.id.au>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Florian Walch <florian@fwalch.com>
Removed unneeded platform checks from config/config.h.in and
config/CMakeLists.txt
- HAVE_OSPEED and HAVE_UP_BC_PC were used by the old UI, and are
no longer needed.
- sigvec() was used as part of the signal handling code in os_unix.c, but it is
no longer used in Neovim.
- The function lstat() is no longer used, replaced with libuv.
From here[1]:
1.1.4 2015-04-26
- move maintainer options from GNUmakefile to maint.mk
- compile with -O2 by default
1.1.3 2015-04-25
- fix permission error when installing into existing directory
(gh PR #7)
- relicense tools/*.c under MIT (gh #9)
- add change log in Changes
[1]: https://github.com/mauke/unibilium/compare/v1.1.2...v1.1.4
Regarding debugger.txt (which was Spotted by @Hettomei):
The third section was empty, and the second section is very outdated.
Nvim doesn't have things like Balloon Evalutation and Sun Visual
workshop integration, so just remove the section.
Regarding everything else:
- term.[ch] and term_defs.h don't exist anymore, so remove refs to them
- Add ttybuiltin to vim_diff.txt. It should have been done before, but
vim_diff.txt didn't exist when ttybuiltin was removed (done in
3baba1e7bc6698e6bc9f1d37fce88b30d6274bc9,)
Helped-by: Justin M. Keyes <justinkz@gmail.com>
Resolves#2632. This is done so C helper modules don't generate unexpected
coverage output.
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Florian Walch <florian@fwalch.com>
Changes since 2.0.3:
- Fix stack check in narrowing optimization.
- Fix Lua/C API typecheck error for special indexes.
- Fix string to number conversion.
- Fix lexer error for chunks without tokens.
- Don't compile IR_RETF after CALLT to ff with-side effects.
- Fix BC_UCLO/BC_JMP join optimization in Lua parser.
- Fix corner case in string to number conversion.
- Gracefully handle lua_error() for a suspended coroutine.
- Avoid error messages when building with Clang.
- Fix snapshot #0 handling for traces with a stack check on entry.
- Fix fused constant loads under high register pressure.
- Invalidate backpropagation cache after DCE.
- Fix ABC elimination.
- Fix debug info for main chunk of stripped bytecode.
- Fix FOLD rule for string.sub(s, ...) == k.
- Fix FOLD rule for STRREF of SNEW.
- Fix frame traversal while searching for error function.
- Prevent GC estimate miscalculation due to buffer growth.
- Prevent adding side traces for stack checks.
- Fix top slot calculation for snapshots with continuations.
- Fix check for reuse of SCEV results in FORL.
- Add PS Vita port.
- Fix compatibility issues with Illumos.
- Fix DragonFly build (unsupported).
- OpenBSD/x86: Better executable memory allocation for W^X mode.
- x86: Fix argument checks for ipairs() iterator.
- x86: lj_math_random_step() clobbers XMM regs on OSX Clang.
- x86: Fix code generation for unused result of math.random().
- x64: Allow building with LUAJIT_USE_SYSMALLOC and LUAJIT_USE_VALGRIND.
- x86/x64: Fix argument check for bit shifts.
- x86/x64: Fix code generation for fused test/arith ops.
- ARM: Fix write barrier check in BC_USETS.
- PPC: Fix red zone overflow in machine code generation.
- PPC: Don't use mcrxr on PPE.
- Various archs: Fix excess stack growth in interpreter.
- FFI: Fix FOLD rule for TOBIT + CONV num.u32.
- FFI: Prevent DSE across ffi.string().
- FFI: No meta fallback when indexing pointer to incomplete struct.
- FFI: Fix initialization of unions of subtypes.
- FFI: Fix cdata vs. non-cdata arithmetic and comparisons.
- FFI: Fix __index/__newindex metamethod resolution for ctypes.
- FFI: Fix compilation of reference field access.
- FFI: Fix frame traversal for backtraces with FFI callbacks.
- FFI: Fix recording of indexing a struct pointer ctype object itself.
- FFI: Allow non-scalar cdata to be compared for equality by address.
- FFI: Fix pseudo type conversions for type punning.
Taken from http://luajit.org/changes.html
For now, only install man pages matching "nvim*.1": we don't want to
install xxd.1 as it might conflict with that of a user's Vim
installation.
closes#1826
Reviewed-by: Florian Walch <florian@fwalch.com>
Helped-by: John Szakmeister <john@szakmeister.net>
Remove related dead code and references in the docs.
Helped-By: Michael Reed <m.reed@mykolab.com>
Helped-By: Shougo Matsushita <Shougo.Matsu@gmail.com>
- On startup, v:servername is equivalent to $NVIM_LISTEN_ADDRESS
- v:servername may be considered the "default" server address
- v:servername does not change unless the associated server is stopped
by serverstop()
Problem: Segfault with wide screen and error in 'rulerformat'. (Ingo Karkat)
Solution: Check there is enough space. (Christian Brabandt)
https://github.com/vim/vim/commit/v7-4-562