summaryrefslogtreecommitdiffstats
path: root/src/normal.c
diff options
context:
space:
mode:
authorColin Kennedy <colinvfx@gmail.com>2024-03-03 16:16:47 +0100
committerChristian Brabandt <cb@256bit.org>2024-03-03 16:16:47 +0100
commit215703563757a4464907ead6fb9edaeb7f430bea (patch)
tree380d7492e2fc174d13a073c6fd4e8dae6714030f /src/normal.c
parent353faa373eb132987a1985cf3abe18c006f8cdf0 (diff)
patch 9.1.0147: Cannot keep a buffer focused in a windowv9.1.0147
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 <colinvfx@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c6
1 files changed, 5 insertions, 1 deletions
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;
}