Problem: Accessing memory before an allocated block.
Solution: Check for not going before the start of a pattern. (Dominique Pelle)
https://github.com/vim/vim/commit/v7-4-799
In Windows there is no equivalent to the filesystem executable bit; the
documentation states that for Windows :executable() returns
1 for all files. But this behaviour was broken because is_executable()
checked for the UNIX bit.
When WIN32 is defined we now skip the S_IXUSR check.
After @250aca4f8938 it is possible that terminal_close will be called without
invoking the close_cb(which normally destroys the terminal structure). If this
happens, the terminal buffer will already be deleted so there's no need to call
`bwipeout!`.
The call to `event_init()` was too late. `command_line_scan()` in `main()` could
already need the loop initialized. Ref https://github.com/neovim/neovim/issues/3045#issuecomment-123405833.
A consequence of this change is that it was necessary to move the
`channel_from_stdio()` call to `command_line_scan()` when embedded_mode is set.
- Explicitly set the SignalWatcher event queue. Without this, the watcher will
publish events to the fast queue, resulting in resize bugs for certain
terminals(#2322).
- Set `async = false` to the `remote_ui_attach` handler(It was a deferred
before, this is the new equivalent)
It is possible for a processed event in the input loop of
terminal_enter() to destroy the terminal. But this is undetected by the
function and it still tries to use the freed terminal.
Use a reference count to delay the freeing of the terminal until
terminal_enter() returns.
Fixes#3112
I see that problem fixed by #2801 was resurrected by making help tags file
generated in a more direct way. This fixes the hang without using the empty
file.
os_file_is_readonly() in its current form is equivalent to
!os_file_is_writable(). This does not appear to be a bug, because Vim's
use of check_file_readonly() (which we changed to os_file_is_readonly())
is equivalent to !os_file_is_writable() in every case.
os_file_is_readonly() also fails this test:
returns false if the file is non-read, non-write
A more useful form would define behavior under these cases:
- path is executable (but not writable)
- path is non-existent
- path is directory
But there is no reason for os_file_is_readonly() to exist, so remove it.
Processing a stream's output can be queued. If stream_close() is called
before the queue is processed, the RBuffer containing the stream's data
is freed and the next read event would try to access freed memory.
To fix this behavior, use the stream's pending requests counter.
vim-tutor-mode provides a mechanism to write and read interactive
tutorials in vim. It's aim is to replace the venerable vimtutor with a
more modern system.
The plugin's development is maintained at https://github.com/fmoralesc
/vim-tutor-mode
Closes#2351.
The new event processing architecture changed `jobwait()` semantics: Only one
job is processed at time since process_wait only focuses on one queue.
This fixes the problem with a few changes:
- Allow the event queue polled by `process_wait` to be overriden by a new
argument.
- Allow the parent queue to be overriden with `queue_replace_parent`
- Create a temporary queue that serves as the parent for all jobs passed to
`jobwait()`