summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-31 18:41:27 +0200
committerChristian Brabandt <cb@256bit.org>2024-03-31 18:41:27 +0200
commit5bf6c2117fcef85fcf046c098dd3eb72a0147859 (patch)
tree32804af25b55ac2859188f9bc0771a38d078862c /src/evalfunc.c
parent86032702932995db74fed265ba99ae0c823cb75d (diff)
patch 9.1.0231: Filetype may be undetected when SwapExists sets ft in other bufv9.1.0231
Problem: Filetype may be undetected when a SwapExists autocommand sets filetype in another buffer. Solution: Make filetype detection state buffer-specific. Also fix a similar problem for 'modified' (zeertzjq). closes: #14344 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 8c27986b42..0e071d87bc 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3920,7 +3920,7 @@ f_deepcopy(typval_T *argvars, typval_T *rettv)
static void
f_did_filetype(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
- rettv->vval.v_number = did_filetype;
+ rettv->vval.v_number = curbuf->b_did_filetype;
}
/*