| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Special-case for -E/-Es (as opposed to -e/-es).
-es/-Es is the only mode that really allows N/Vim to work as a batch
script engine. Adding a new flag (say `-x`) would involve a lot of
churn: -es/-Es is implemented by checking `exmode_active` in numerous
places.
This commit does not change -es because some scripts use it. But scripts
are unlikely to use -Es because it is not functionally different from
-es.
Also, both -es and -Es were broken in Nvim for years and no one
mentioned it...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Treat stdin as text by default (so the "-" file is not needed):
echo foo | nvim
It works with file args (implemented in next commit), too:
echo foo | nvim file1.txt file2.txt
Why? Because:
- Execution of input is (1) almost always unintentional/confusing,
and (2) potentially destructive.
- Avoids the need for time-delayed warning. #7659
- The _common_ case is to open text in a buffer, not send commands.
Note:
- Not for Ex-mode (-es) because it is used by scripts. But maybe `-Es`?
- Not for --headless, because stdio may be a protocol stream and may be
used for any purpose by stdioopen().
To treat stdin as Normal-mode commands, use `-s -` instead:
echo ifoo | nvim -s -
Other alternatives:
- Replay a register. E.g. the following mostly works, except @q aborts
on any "beep" (e.g. if the cursor can't move).
nvim -c '%d q|norm @q' -
- Future: Let `:%source` work with unsaved buffer contents?
closes #2087
closes #7659
|
|
|
|
|
|
|
|
| |
This code was essentially dead because this condition:
(!parmp->err_isatty && (!parmp->output_isatty || !parmp->input_isatty))
is almost never true.
ref #7659
|
| |
|
|
|
|
|
| |
Vim's vimrc_found() also handles setting 'nocompatible', that's why it
does vimrc_found(NULL, NULL).
|
|
|
|
| |
closes #8393
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Reading from stdin on Windows is fixed in the same way as it was in
#8267.
* The file_read function was returning without filling the
destination buffer when it was called with a non-blocking file
descriptor.
|
| |\ |
|
| |\ \ |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: as fileio is cached and reads blocks this is going to wait
until either EOF or reading enough characters to fill rbuffer. This is
not good when reading user input from stdin as script.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
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*`.
|
| | | | |
|
| |_|/
|/| |
| | |
| | | |
closes #8285
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
MSVC predefines `_WIN32`, but not `WIN32`. Also, some unnecessary includes have been removed.
|
| | |
| | |
| | |
| | | |
With MSVC, STDOUT_FILENO and STDERR_FILENO are defined as function calls instead of constants, meaning they can't be assigned to enum values. The enum was only used in one file, so it has been removed. A definition for STDIN_FILENO has been added that is consistent with the other two definitions.
|
| | |
| | |
| | |
| | | |
This should fix a particular false positive from clang 5.0.0 scan-build,
which thinks that nlua_init() can continue after preserve_exit().
|
| | | |
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| | |
'encoding'
Problem: When running :make the output may be in the system encoding,
different from 'encoding'.
Solution: Add the 'makeencoding' option. (Ken Takata)
https://github.com/vim/vim/commit/2c7292dc5bbf155fe2192d417363b8c085759cad
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Nvim note: intentionally did not include `--ttyfail` since its purpose
is not clear. (And it isn't used in any Vim test files/scripts).
---
Problem: When the input or output is not a tty Vim appears to hang.
Solution: Add the --ttyfail argument. Also add the "ttyin" and "ttyout"
features to be able to check in Vim script.
https://github.com/vim/vim/commit/2cab0e191055a8145ccd46cd52869fbb9798b971
|
| | |
|
| | |
|
| | |
|
| |
| |
| | |
fix #7060
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Plugins in start packages are sourced twice. (mseplowitz)
Solution: Use the unmodified runtime path when loading plugins (test by Ingo
Karkat, closes vim/vim#1801)
https://github.com/vim/vim/commit/07ecfa64a18609a986f21d6132d04ee8934f3200
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Package directories are added to 'runtimepath' only after loading
non-package plugins.
Solution: Split off the code to add package directories to 'runtimepath'.
(Ingo Karkat, closes vim/vim#1680)
https://github.com/vim/vim/commit/ce876aaa9a250a5a0d0e34b3a2625e51cf9bf5bb
|
| |
| |
| |
| |
| |
| | |
Group some options, and sort them alphabetically.
`nvim -h` should fit on one (smallish) screen.
Uncommon options don't need to be here, they live in the :help.
|
| |
| |
| |
| | |
References ac055d677aa9
References #4370
|
| |
| |
| |
| |
| |
| |
| | |
Treat dialogs in the same way as "silent mode" (`nvim -es`).
References #1984
References #3901
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
Apparently the latter is not a part of the public C API.
|
| |
| |
| |
| |
| | |
It is useless to use sbuffer here and print that to stdout, just using “fbuffer”
instead.
|
| |
| |
| |
| |
| |
| | |
Avoids a hang, and also helps diagnose issues like:
https://github.com/neovim/neovim/pull/6594#issuecomment-298321826
|
| |
| |
| |
| |
| |
| |
| |
| | |
AFAIK there is no way NULL can be there, including from the line it points to.
Dunno what analyser was thinking, but dereferencing of `argv[0]` happened just
before `get_number_arg()` call: in `ascii_isdigit()` two lines above. And `idx`
cannot possibly be NULL ever, it comes from `&varname`, this could not ever give
anything, but a valid pointer.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
If procfs is missing then libuv cannot find the exe path.
Fallback to path_guess_exepath(), adapted from Vim findYourself().
Closes #6734
|
| |
| |
| |
| | |
remove pointless control chars in the text stream
|
| | |
|