diff --git a/src/client.cc b/src/client.cc index d9fbf946..07636e6a 100644 --- a/src/client.cc +++ b/src/client.cc @@ -77,8 +77,6 @@ void Client::handle_available_input(EventMode mode) { if (*key == ctrl('c')) killpg(getpgrp(), SIGINT); - if (*key == ctrl('l')) - redraw_ifn(true); else if (*key == Key::FocusIn) context().hooks().run_hook("FocusIn", context().name(), context()); else if (*key == Key::FocusOut) diff --git a/src/normal.cc b/src/normal.cc index 4d95ff53..d0850a92 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -1560,6 +1560,12 @@ void ensure_forward(Context& context, NormalParams) context.selections().check_invariant(); } +void force_redraw(Context& context, NormalParams) +{ + if (context.has_client()) + context.client().redraw_ifn(true); +} + static NormalCmdDesc cmds[] = { { 'h', "move left", move }, @@ -1734,6 +1740,8 @@ static NormalCmdDesc cmds[] = { 'z', "restore selections", restore_selections }, { alt('z'), "append saved selections", restore_selections }, { 'Z', "save selections", save_selections }, + + { ctrl('l'), "force redraw", force_redraw }, }; KeyMap keymap = cmds;