aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/win_config.c3
-rw-r--r--src/nvim/normal.c2
-rw-r--r--src/nvim/option.c3
3 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/api/win_config.c b/src/nvim/api/win_config.c
index 3d77d65fbc..ebdbd896a5 100644
--- a/src/nvim/api/win_config.c
+++ b/src/nvim/api/win_config.c
@@ -197,6 +197,9 @@ Window nvim_open_win(Buffer buffer, Boolean enter, Dict(float_config) *config, E
if (win_valid(wp) && buffer > 0) {
Boolean noautocmd = !enter || fconfig.noautocmd;
win_set_buf(wp, buf, noautocmd, err);
+ if (!fconfig.noautocmd) {
+ apply_autocmds(EVENT_WINNEW, NULL, NULL, false, buf);
+ }
}
if (!win_valid(wp)) {
api_set_error(err, kErrorTypeException, "Window was closed immediately");
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 4280d62a95..d730f247a9 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -4513,7 +4513,7 @@ static void nv_replace(cmdarg_T *cap)
// Visual mode "r"
if (VIsual_active) {
if (got_int) {
- reset_VIsual();
+ got_int = false;
}
if (had_ctrl_v) {
// Use a special (negative) number to make a difference between a
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 803c5173ea..c34999ed32 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -1915,6 +1915,9 @@ bool parse_winhl_opt(win_T *wp)
char *commap = xstrchrnul(hi, ',');
size_t len = (size_t)(commap - hi);
int hl_id = len ? syn_check_group(hi, len) : -1;
+ if (hl_id == 0) {
+ return false;
+ }
int hl_id_link = nlen ? syn_check_group(p, nlen) : 0;
HlAttrs attrs = HLATTRS_INIT;