diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc index 67dd244e..c40124ab 100644 --- a/src/main.cc +++ b/src/main.cc @@ -27,6 +27,8 @@ #include <mach-o/dyld.h> #endif +#define CTRL(x) x - 'a' + 1 + using namespace Kakoune; using namespace std::placeholders; @@ -292,6 +294,15 @@ std::string ncurses_prompt(const std::string& text, Completer completer = comple current_completion = -1; break; + case CTRL('r'): + { + c = getch(); + std::string reg = RegisterManager::instance()[c].get(); + current_completion = -1; + result = result.substr(0, cursor_pos) + reg + result.substr(cursor_pos, std::string::npos); + cursor_pos += reg.length(); + } + break; case 27: throw prompt_aborted(); case '\t': |
