diff options
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index 0fff93d984..4931221e7a 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -1490,13 +1490,11 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir) if (flags & (WSP_TOP | WSP_BOT)) (void)win_comp_pos(); - /* - * Both windows need redrawing - */ + // Both windows need redrawing. Update all status lines, in case they + // show something related to the window count or position. redraw_win_later(wp, NOT_VALID); - wp->w_redr_status = TRUE; redraw_win_later(oldwin, NOT_VALID); - oldwin->w_redr_status = TRUE; + status_redraw_all(); if (need_status) { msg_row = Rows - 1; @@ -2580,9 +2578,10 @@ int win_close(win_T *win, bool free_buf) return OK; } - /* Free independent synblock before the buffer is freed. */ - if (win->w_buffer != NULL) + // Free independent synblock before the buffer is freed. + if (win->w_buffer != NULL) { reset_synblock(win); + } /* * Close the link to the buffer. @@ -6019,6 +6018,12 @@ char_u *grab_file_name(long count, linenr_T *file_lnum) char_u *ptr; if (get_visual_text(NULL, &ptr, &len) == FAIL) return NULL; + // Only recognize ":123" here + if (file_lnum != NULL && ptr[len] == ':' && isdigit(ptr[len + 1])) { + char_u *p = ptr + len + 1; + + *file_lnum = getdigits_long(&p, false, 0); + } return find_file_name_in_path(ptr, len, options, count, curbuf->b_ffname); } return file_name_at_cursor(options | FNAME_HYP, count, file_lnum); @@ -6986,7 +6991,7 @@ void win_findbuf(typval_T *argvars, list_T *list) int bufnr = tv_get_number(&argvars[0]); FOR_ALL_TAB_WINDOWS(tp, wp) { - if (wp->w_buffer->b_fnum == bufnr) { + if (!wp->w_closing && wp->w_buffer->b_fnum == bufnr) { tv_list_append_number(list, wp->handle); } } |