Debug: add key integral value in the debug buffer on keystroke

This commit is contained in:
Maxime Coste 2011-10-10 22:47:19 +00:00
parent 219709e472
commit f802a9f3be

View File

@ -11,6 +11,7 @@
#include <unordered_map> #include <unordered_map>
#include <map> #include <map>
#include <sstream>
#include <ncurses.h> #include <ncurses.h>
using namespace Kakoune; using namespace Kakoune;
@ -569,7 +570,9 @@ int main(int argc, char* argv[])
try try
{ {
char c = getch(); 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)) if (isdigit(c))
count = count * 10 + c - '0'; count = count * 10 + c - '0';