From 215703563757a4464907ead6fb9edaeb7f430bea Mon Sep 17 00:00:00 2001 From: Colin Kennedy Date: Sun, 3 Mar 2024 16:16:47 +0100 Subject: patch 9.1.0147: Cannot keep a buffer focused in a window Problem: Cannot keep a buffer focused in a window (Amit Levy) Solution: Add the 'winfixbuf' window-local option (Colin Kennedy) fixes: #6445 closes: #13903 Signed-off-by: Colin Kennedy Signed-off-by: Christian Brabandt --- src/normal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/normal.c') diff --git a/src/normal.c b/src/normal.c index 791b02f1cd..5ef3a9277c 100644 --- a/src/normal.c +++ b/src/normal.c @@ -4073,6 +4073,9 @@ nv_gotofile(cmdarg_T *cap) return; #endif + if (!check_can_set_curbuf_disabled()) + return; + ptr = grab_file_name(cap->count1, &lnum); if (ptr != NULL) @@ -4475,7 +4478,8 @@ nv_brackets(cmdarg_T *cap) SAFE_isupper(cap->nchar) ? ACTION_SHOW_ALL : SAFE_islower(cap->nchar) ? ACTION_SHOW : ACTION_GOTO, cap->cmdchar == ']' ? curwin->w_cursor.lnum + 1 : (linenr_T)1, - (linenr_T)MAXLNUM); + (linenr_T)MAXLNUM, + FALSE); vim_free(ptr); curwin->w_set_curswant = TRUE; } -- cgit v1.2.3