diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2011-09-23 14:27:34 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2011-09-23 14:27:34 +0000 |
| commit | c2cbd69c1abdb114b2d349441ac88e520f31bdd2 (patch) | |
| tree | 6e1257a0e77cdaa9684ec960f67e375b249c3c75 /src | |
| parent | 26537d7028afe67bcf78c24374f948f4f1fddc6b (diff) | |
main: using namespace std::placeholders
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main.cc b/src/main.cc index b21737ac..16bd6d5e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -11,6 +11,7 @@ #include <ncurses.h> using namespace Kakoune; +using namespace std::placeholders; void draw_window(Window& window) { @@ -360,17 +361,17 @@ std::unordered_map<char, std::function<void (Window& window, int count)>> keymap { 'k', [](Window& window, int count) { window.move_cursor(WindowCoord(-std::max(count,1), 0)); window.empty_selections(); } }, { 'l', [](Window& window, int count) { window.move_cursor(WindowCoord(0, std::max(count,1))); window.empty_selections(); } }, - { 'H', [](Window& window, int count) { window.select(true, std::bind(move_select, std::ref(window), std::placeholders::_1, + { 'H', [](Window& window, int count) { window.select(true, std::bind(move_select, std::ref(window), _1, WindowCoord(0, -std::max(count,1)))); } }, - { 'J', [](Window& window, int count) { window.select(true, std::bind(move_select, std::ref(window), std::placeholders::_1, + { 'J', [](Window& window, int count) { window.select(true, std::bind(move_select, std::ref(window), _1, WindowCoord( std::max(count,1), 0))); } }, - { 'K', [](Window& window, int count) { window.select(true, std::bind(move_select, std::ref(window), std::placeholders::_1, + { 'K', [](Window& window, int count) { window.select(true, std::bind(move_select, std::ref(window), _1, WindowCoord(-std::max(count,1), 0))); } }, - { 'L', [](Window& window, int count) { window.select(true, std::bind(move_select, std::ref(window), std::placeholders::_1, + { 'L', [](Window& window, int count) { window.select(true, std::bind(move_select, std::ref(window), _1, WindowCoord(0, std::max(count,1)))); } }, - { 't', [](Window& window, int count) { window.select(false, std::bind(select_to, std::placeholders::_1, getch(), false)); } }, - { 'f', [](Window& window, int count) { window.select(false, std::bind(select_to, std::placeholders::_1, getch(), true)); } }, + { 't', [](Window& window, int count) { window.select(false, std::bind(select_to, _1, getch(), false)); } }, + { 'f', [](Window& window, int count) { window.select(false, std::bind(select_to, _1, getch(), true)); } }, { 'd', [](Window& window, int count) { window.erase(); window.empty_selections(); } }, { 'c', [](Window& window, int count) { window.erase(); do_insert(window); } }, |
