From f802a9f3bea1f3b1bfe2bc13b42706a287bbd8d5 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 10 Oct 2011 22:47:19 +0000 Subject: [PATCH] Debug: add key integral value in the debug buffer on keystroke --- src/main.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index 0d78f437..e7693a8a 100644 --- a/src/main.cc +++ b/src/main.cc @@ -11,6 +11,7 @@ #include #include +#include #include using namespace Kakoune; @@ -569,7 +570,9 @@ int main(int argc, char* argv[]) try { char c = getch(); - write_debug(std::string("key ") + c + '\n'); + std::ostringstream oss; + oss << "key " << int(c) << " (" << c << ")\n"; + write_debug(oss.str()); if (isdigit(c)) count = count * 10 + c - '0';