aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/event/rstream.c19
-rw-r--r--src/nvim/fileio.c1
-rw-r--r--src/nvim/tui/tui.c1
-rw-r--r--src/nvim/version.c9
4 files changed, 27 insertions, 3 deletions
diff --git a/src/nvim/event/rstream.c b/src/nvim/event/rstream.c
index 0a720bb852..9f3fbc25ff 100644
--- a/src/nvim/event/rstream.c
+++ b/src/nvim/event/rstream.c
@@ -177,10 +177,25 @@ static void read_event(void **argv)
bool eof = (uintptr_t)argv[2];
stream->read_cb(stream, stream->buffer, count, stream->data, eof);
}
+ stream->pending_reqs--;
+ if (stream->closed && !stream->pending_reqs) {
+ stream_close_handle(stream);
+ }
}
static void invoke_read_cb(Stream *stream, size_t count, bool eof)
{
- CREATE_EVENT(stream->events, read_event, 3, stream,
- (void *)(uintptr_t *)count, (void *)(uintptr_t)eof);
+ if (stream->closed) {
+ return;
+ }
+
+ // Don't let the stream be closed before the event is processed.
+ stream->pending_reqs++;
+
+ CREATE_EVENT(stream->events,
+ read_event,
+ 3,
+ stream,
+ (void *)(uintptr_t *)count,
+ (void *)(uintptr_t)eof);
}
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 58e4873e00..c9e11d8fb5 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -418,7 +418,6 @@ readfile (
* If the name is too long we might crash further on, quit here.
*/
if (fname != NULL && *fname != NUL) {
- p = fname + STRLEN(fname);
if (STRLEN(fname) >= MAXPATHL) {
filemess(curbuf, fname, (char_u *)_("Illegal file name"), 0);
msg_end();
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 460fdb81a8..57a2b896f7 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -207,6 +207,7 @@ static void tui_stop(UI *ui)
static void sigwinch_cb(SignalWatcher *watcher, int signum, void *data)
{
+ got_winch = true;
UI *ui = data;
update_size(ui);
ui_refresh();
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 1f8aaf6e69..7ab7467661 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -1098,6 +1098,15 @@ void intro_message(int colon)
N_("by Bram Moolenaar et al."),
N_("Vim is open source and freely distributable"),
"",
+ N_("First time using a vi-like editor?"),
+ N_("Type :Tutor<Enter> to get started!"),
+ "",
+ N_("Already know your way around Vim?"),
+ N_("See :help nvim-intro for an introduction to Neovim."),
+ "",
+ N_("Still have questions?"),
+ N_("Reach out to the Neovim community at neovim.io/community."),
+ "",
N_("Help poor children in Uganda!"),
N_("type :help iccf<Enter> for information "),
"",