aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/nvim.appdata.xml11
-rw-r--r--src/nvim/fileio.c23
-rw-r--r--src/nvim/window.c2
3 files changed, 24 insertions, 12 deletions
diff --git a/runtime/nvim.appdata.xml b/runtime/nvim.appdata.xml
index 095e6c6fa8..fb409ff0b8 100644
--- a/runtime/nvim.appdata.xml
+++ b/runtime/nvim.appdata.xml
@@ -8,6 +8,7 @@
-->
<component type="desktop-application">
<id>nvim</id>
+ <translation type="gettext">nvim</translation>
<project_license>Apache-2.0</project_license>
<metadata_license>CC0-1.0</metadata_license>
<name>Neovim</name>
@@ -24,6 +25,16 @@
</screenshot>
</screenshots>
+ <releases>
+ <release date="2019-04-29" version="0.3.5"/>
+ <release date="2019-01-13" version="0.3.4"/>
+ <release date="2019-01-05" version="0.3.3"/>
+ <release date="2018-12-31" version="0.3.2"/>
+ <release date="2018-07-19" version="0.3.1"/>
+ <release date="2018-07-11" version="0.3.0"/>
+ </releases>
+
+ <content_rating type="oars-1.1"/>
<launchable type="desktop-id">nvim.desktop</launchable>
<url type="homepage">https://neovim.io/</url>
<url type="bugtracker">https://github.com/neovim/neovim/issues</url>
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 433c571108..416d7f5cce 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -6520,14 +6520,17 @@ bool check_nomodeline(char_u **argp)
return true;
}
-/// Prepare for executing autocommands for (hidden) buffer "buf".
-/// Search for a visible window containing the current buffer. If there isn't
-/// one then use "aucmd_win".
-/// Set "curbuf" and "curwin" to match "buf".
+/// Prepare for executing autocommands for (hidden) buffer `buf`.
+/// If the current buffer is not in any visible window, put it in a temporary
+/// floating window `aucmd_win`.
+/// Set `curbuf` and `curwin` to match `buf`.
+///
+/// @param aco structure to save values in
+/// @param buf new curbuf
void aucmd_prepbuf(aco_save_T *aco, buf_T *buf)
{
win_T *win;
- bool auwin_appended = false;
+ bool need_append = true; // Append `aucmd_win` to the window list.
/* Find a window that is for the new buffer */
if (buf == curbuf) { /* be quick when buf is curbuf */
@@ -6542,10 +6545,10 @@ void aucmd_prepbuf(aco_save_T *aco, buf_T *buf)
}
}
- /* Allocate "aucmd_win" when needed. */
+ // Allocate the `aucmd_win` dummy floating window.
if (win == NULL && aucmd_win == NULL) {
win_alloc_aucmd_win();
- auwin_appended = true;
+ need_append = false;
}
if (win == NULL && aucmd_win_used)
/* Strange recursive autocommand, fall back to using the current
@@ -6580,18 +6583,16 @@ void aucmd_prepbuf(aco_save_T *aco, buf_T *buf)
aco->globaldir = globaldir;
globaldir = NULL;
- block_autocmds();
- if (!auwin_appended) {
+ block_autocmds(); // We don't want BufEnter/WinEnter autocommands.
+ if (need_append) {
win_append(lastwin, aucmd_win);
}
-
// Prevent chdir() call in win_enter_ext(), through do_autochdir()
int save_acd = p_acd;
p_acd = false;
win_enter(aucmd_win, false);
p_acd = save_acd;
unblock_autocmds();
-
curwin = aucmd_win;
}
curbuf = buf;
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 7d6f88d469..e737bfbd05 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -3412,7 +3412,7 @@ int win_alloc_first(void)
return OK;
}
-// Init "aucmd_win". This can only be done after the first window
+// Init `aucmd_win`. This can only be done after the first window
// is fully initialized, thus it can't be in win_alloc_first().
void win_alloc_aucmd_win(void)
{