aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/buffer.c1
-rw-r--r--src/nvim/screen.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index c2573cf942..24ba43676a 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1750,6 +1750,7 @@ buf_T * buflist_new(char_u *ffname, char_u *sfname, linenr_T lnum, int flags)
apply_autocmds(EVENT_BUFWIPEOUT, NULL, NULL, false, curbuf);
}
if (aborting()) { // autocmds may abort script processing
+ xfree(ffname);
return NULL;
}
if (buf == curbuf) {
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 5cb1d731cb..9c590efdbc 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -2220,7 +2220,6 @@ win_line (
int tocol = MAXCOL; // end of inverting
int fromcol_prev = -2; // start of inverting after cursor
bool noinvcur = false; // don't invert the cursor
- pos_T *top, *bot;
int lnum_in_visual_area = false;
pos_T pos;
long v;
@@ -2420,6 +2419,8 @@ win_line (
// handle Visual active in this window
if (VIsual_active && wp->w_buffer == curwin->w_buffer) {
+ pos_T *top, *bot;
+
if (ltoreq(curwin->w_cursor, VIsual)) {
// Visual is after curwin->w_cursor
top = &curwin->w_cursor;