diff options
| author | Maxime Coste <mawww@kakoune.org> | 2016-12-21 06:39:58 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2016-12-21 06:39:58 +0000 |
| commit | 62df6dbb46ce00be1031e907d222116864431888 (patch) | |
| tree | 3a5193001ede690e4144d78b5dfaa28b355f3d34 /src/input_handler.cc | |
| parent | 3a6167ae626a27d8920e0596065c29450461b3ad (diff) | |
Display a message when entering insert mode while readonly
Fixes #1050
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index 2a6a8b68..19fd0efd 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -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() |
