From 8baf43ece1596fe9d16af29db26e8737fb1ce4c3 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 6 Sep 2011 18:53:12 +0000 Subject: [PATCH] binding of undo to 'u' and redo to 'U' --- src/main.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cc b/src/main.cc index c1e2243a..f4d53b49 100644 --- a/src/main.cc +++ b/src/main.cc @@ -296,6 +296,8 @@ std::unordered_map> keymap { 'E', [](Window& window, int count) { do { window.select(true, select_to_next_word_end); } while(--count > 0); } }, { '.', [](Window& window, int count) { do { window.select(false, select_line); } while(--count > 0); } }, { '/', [](Window& window, int count) { do_search(window); } }, + { 'u', [](Window& window, int count) { do { if (not window.undo()) { print_status("nothing left to undo"); break; } } while(--count > 0); } }, + { 'U', [](Window& window, int count) { do { if (not window.redo()) { print_status("nothing left to redo"); break; } } while(--count > 0); } }, }; int main()