Mercurial > vim
comparison src/globals.h @ 34705:159d598e6781 v9.1.0231
patch 9.1.0231: Filetype may be undetected when SwapExists sets ft in other buf
Commit: https://github.com/vim/vim/commit/5bf6c2117fcef85fcf046c098dd3eb72a0147859
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Mar 31 18:41:27 2024 +0200
patch 9.1.0231: Filetype may be undetected when SwapExists sets ft in other buf
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 31 Mar 2024 18:45:05 +0200 |
parents | ad6cd802579d |
children | 4eeeba47eb0a |
comparison
equal
deleted
inserted
replaced
34704:60194371609e | 34705:159d598e6781 |
---|---|
794 EXTERN int autocmd_busy INIT(= FALSE); // Is apply_autocmds() busy? | 794 EXTERN int autocmd_busy INIT(= FALSE); // Is apply_autocmds() busy? |
795 EXTERN int autocmd_no_enter INIT(= FALSE); // Buf/WinEnter autocmds disabled | 795 EXTERN int autocmd_no_enter INIT(= FALSE); // Buf/WinEnter autocmds disabled |
796 EXTERN int autocmd_no_leave INIT(= FALSE); // Buf/WinLeave autocmds disabled | 796 EXTERN int autocmd_no_leave INIT(= FALSE); // Buf/WinLeave autocmds disabled |
797 EXTERN int tabpage_move_disallowed INIT(= FALSE); // moving tabpages around disallowed | 797 EXTERN int tabpage_move_disallowed INIT(= FALSE); // moving tabpages around disallowed |
798 | 798 |
799 EXTERN int modified_was_set; // did ":set modified" | |
800 EXTERN int did_filetype INIT(= FALSE); // FileType event found | |
801 EXTERN int keep_filetype INIT(= FALSE); // value for did_filetype when | |
802 // starting to execute | |
803 // autocommands | |
804 | |
805 // Set by the apply_autocmds_group function if the given event is equal to | |
806 // EVENT_FILETYPE. Used by the readfile function in order to determine if | |
807 // EVENT_BUFREADPOST triggered the EVENT_FILETYPE. | |
808 // | |
809 // Relying on this value requires one to reset it prior calling | |
810 // apply_autocmds_group. | |
811 EXTERN int au_did_filetype INIT(= FALSE); | |
812 | |
813 // When deleting the current buffer, another one must be loaded. If we know | 799 // When deleting the current buffer, another one must be loaded. If we know |
814 // which one is preferred, au_new_curbuf is set to it | 800 // which one is preferred, au_new_curbuf is set to it |
815 EXTERN bufref_T au_new_curbuf INIT3(NULL, 0, 0); | 801 EXTERN bufref_T au_new_curbuf INIT3(NULL, 0, 0); |
816 | 802 |
817 // When deleting a buffer/window and autocmd_busy is TRUE, do not free the | 803 // When deleting a buffer/window and autocmd_busy is TRUE, do not free the |