parent
6873a44e3e
commit
d2b0dba39d
|
@ -67,24 +67,27 @@ void Client::handle_available_input(EventMode mode)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
while (Optional<Key> key = get_next_key(mode))
|
try
|
||||||
{
|
{
|
||||||
if (*key == ctrl('c'))
|
while (Optional<Key> key = get_next_key(mode))
|
||||||
killpg(getpgrp(), SIGINT);
|
{
|
||||||
else if (*key == Key::FocusIn)
|
if (*key == ctrl('c'))
|
||||||
context().hooks().run_hook("FocusIn", context().name(), context());
|
killpg(getpgrp(), SIGINT);
|
||||||
else if (*key == Key::FocusOut)
|
else if (*key == Key::FocusIn)
|
||||||
context().hooks().run_hook("FocusOut", context().name(), context());
|
context().hooks().run_hook("FocusIn", context().name(), context());
|
||||||
else if (key->modifiers == Key::Modifiers::Resize)
|
else if (*key == Key::FocusOut)
|
||||||
force_redraw();
|
context().hooks().run_hook("FocusOut", context().name(), context());
|
||||||
else
|
else if (key->modifiers == Key::Modifiers::Resize)
|
||||||
m_input_handler.handle_key(*key);
|
force_redraw();
|
||||||
|
else
|
||||||
|
m_input_handler.handle_key(*key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Kakoune::runtime_error& error)
|
||||||
|
{
|
||||||
|
context().print_status({ error.what().str(), get_face("Error") });
|
||||||
|
context().hooks().run_hook("RuntimeError", error.what(), context());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (Kakoune::runtime_error& error)
|
|
||||||
{
|
|
||||||
context().print_status({ error.what().str(), get_face("Error") });
|
|
||||||
context().hooks().run_hook("RuntimeError", error.what(), context());
|
|
||||||
}
|
}
|
||||||
catch (Kakoune::client_removed& removed)
|
catch (Kakoune::client_removed& removed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,13 +42,16 @@ Client* ClientManager::create_client(std::unique_ptr<UserInterface>&& ui,
|
||||||
m_clients.emplace_back(client);
|
m_clients.emplace_back(client);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CommandManager::instance().execute(init_commands, client->context());
|
try
|
||||||
}
|
{
|
||||||
catch (Kakoune::runtime_error& error)
|
CommandManager::instance().execute(init_commands, client->context());
|
||||||
{
|
}
|
||||||
client->context().print_status({ error.what().str(), get_face("Error") });
|
catch (Kakoune::runtime_error& error)
|
||||||
client->context().hooks().run_hook("RuntimeError", error.what(),
|
{
|
||||||
client->context());
|
client->context().print_status({ error.what().str(), get_face("Error") });
|
||||||
|
client->context().hooks().run_hook("RuntimeError", error.what(),
|
||||||
|
client->context());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Kakoune::client_removed& removed)
|
catch (Kakoune::client_removed& removed)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user