mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
vim-patch:8.1.2048: not clear why SafeState and SafeStateAgain are not triggered
Problem: Not clear why SafeState and SafeStateAgain are not triggered.
Solution: Add log statements.
37d1807a80
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -282,6 +282,11 @@ void may_trigger_safestate(bool safe)
|
|||||||
&& !using_script()
|
&& !using_script()
|
||||||
&& !global_busy;
|
&& !global_busy;
|
||||||
|
|
||||||
|
if (was_safe != is_safe) {
|
||||||
|
// Only log when the state changes, otherwise it happens at nearly
|
||||||
|
// every key stroke.
|
||||||
|
DLOG(is_safe ? "Start triggering SafeState" : "Stop triggering SafeState");
|
||||||
|
}
|
||||||
if (is_safe) {
|
if (is_safe) {
|
||||||
apply_autocmds(EVENT_SAFESTATE, NULL, NULL, false, curbuf);
|
apply_autocmds(EVENT_SAFESTATE, NULL, NULL, false, curbuf);
|
||||||
}
|
}
|
||||||
@@ -293,5 +298,8 @@ void may_trigger_safestate(bool safe)
|
|||||||
/// may_trigger_safestate().
|
/// may_trigger_safestate().
|
||||||
void state_no_longer_safe(void)
|
void state_no_longer_safe(void)
|
||||||
{
|
{
|
||||||
|
if (was_safe) {
|
||||||
|
DLOG("safe state reset");
|
||||||
|
}
|
||||||
was_safe = false;
|
was_safe = false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user