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(); last_insert().disable_hooks = context().hooks_disabled();
context().hooks().run_hook("InsertBegin", "", context()); context().hooks().run_hook("InsertBegin", "", context());
prepare(m_insert_mode, count); 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() ~Insert()