summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:40:16 +0000
commit6af24b2457752c0d36aaf9f29f03d39afd09937f (patch)
tree2671b594908d1f971de6b2a2d473f97dfb7291d2 /src/ex_docmd.c
parentReleasing progress-linux version 2:9.1.0016-1~progress7.99u1. (diff)
downloadvim-6af24b2457752c0d36aaf9f29f03d39afd09937f.tar.xz
vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index c18a910..19b1d85 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7164,6 +7164,9 @@ ex_resize(exarg_T *eap)
static void
ex_find(exarg_T *eap)
{
+ if (!check_can_set_curbuf_forceit(eap->forceit))
+ return;
+
char_u *fname;
int count;
char_u *file_to_find = NULL;
@@ -7245,6 +7248,14 @@ ex_open(exarg_T *eap)
static void
ex_edit(exarg_T *eap)
{
+ // Exclude commands which keep the window's current buffer
+ if (
+ eap->cmdidx != CMD_badd
+ && eap->cmdidx != CMD_balt
+ // All other commands must obey 'winfixbuf' / ! rules
+ && !check_can_set_curbuf_forceit(eap->forceit))
+ return;
+
do_exedit(eap, NULL);
}
@@ -9031,7 +9042,7 @@ ex_checkpath(exarg_T *eap)
{
find_pattern_in_path(NULL, 0, 0, FALSE, FALSE, CHECK_PATH, 1L,
eap->forceit ? ACTION_SHOW_ALL : ACTION_SHOW,
- (linenr_T)1, (linenr_T)MAXLNUM);
+ (linenr_T)1, (linenr_T)MAXLNUM, eap->forceit);
}
#if defined(FEAT_QUICKFIX)
@@ -9101,7 +9112,7 @@ ex_findpat(exarg_T *eap)
find_pattern_in_path(eap->arg, 0, (int)STRLEN(eap->arg),
whole, !eap->forceit,
*eap->cmd == 'd' ? FIND_DEFINE : FIND_ANY,
- n, action, eap->line1, eap->line2);
+ n, action, eap->line1, eap->line2, eap->forceit);
}
#endif