1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-29 01:24:52 +03:00

Move <c-l> handling to normal mode from client

Client handling prevents :exec from triggering a redraw
This commit is contained in:
Maxime Coste 2016-03-07 22:14:03 +00:00
parent 4d4f18a78a
commit 2626ce858f
2 changed files with 8 additions and 2 deletions

View File

@ -77,8 +77,6 @@ void Client::handle_available_input(EventMode mode)
{ {
if (*key == ctrl('c')) if (*key == ctrl('c'))
killpg(getpgrp(), SIGINT); killpg(getpgrp(), SIGINT);
if (*key == ctrl('l'))
redraw_ifn(true);
else if (*key == Key::FocusIn) else if (*key == Key::FocusIn)
context().hooks().run_hook("FocusIn", context().name(), context()); context().hooks().run_hook("FocusIn", context().name(), context());
else if (*key == Key::FocusOut) else if (*key == Key::FocusOut)

View File

@ -1560,6 +1560,12 @@ void ensure_forward(Context& context, NormalParams)
context.selections().check_invariant(); context.selections().check_invariant();
} }
void force_redraw(Context& context, NormalParams)
{
if (context.has_client())
context.client().redraw_ifn(true);
}
static NormalCmdDesc cmds[] = static NormalCmdDesc cmds[] =
{ {
{ 'h', "move left", move<CharCount, Backward> }, { 'h', "move left", move<CharCount, Backward> },
@ -1734,6 +1740,8 @@ static NormalCmdDesc cmds[] =
{ 'z', "restore selections", restore_selections<false> }, { 'z', "restore selections", restore_selections<false> },
{ alt('z'), "append saved selections", restore_selections<true> }, { alt('z'), "append saved selections", restore_selections<true> },
{ 'Z', "save selections", save_selections }, { 'Z', "save selections", save_selections },
{ ctrl('l'), "force redraw", force_redraw },
}; };
KeyMap keymap = cmds; KeyMap keymap = cmds;