1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-25 10:32:19 +03:00

Display a message when entering insert mode while readonly

Fixes #1050
This commit is contained in:
Maxime Coste 2016-12-21 06:39:58 +00:00
parent 3a6167ae62
commit 62df6dbb46

View File

@ -1002,6 +1002,11 @@ public:
last_insert().disable_hooks = context().hooks_disabled();
context().hooks().run_hook("InsertBegin", "", context());
prepare(m_insert_mode, count);
if (context().has_client() and
context().options()["readonly"].get<bool>())
context().print_status({ "Entering insert mode while readonly",
get_face("Information") });
}
~Insert()