From 81138b224ff4c119229b9ace0459c7b64e807f5c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 24 Jan 2012 23:19:26 +0000 Subject: [PATCH] fix line break support in insert_char --- src/main.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.cc b/src/main.cc index bc3fc4ae..ec526658 100644 --- a/src/main.cc +++ b/src/main.cc @@ -341,10 +341,6 @@ bool insert_char(Window& window, IncrementalInserter& inserter, const Key& key) { case 27: return false; - - case '\r': - inserter.insert(std::string() + '\n'); - break; default: inserter.insert(std::string() + key.key); } @@ -378,6 +374,9 @@ bool insert_char(Window& window, IncrementalInserter& inserter, const Key& key) } break; } + case 'm': + inserter.insert(std::string() + '\n'); + break; case 'd': inserter.move_cursor({0, -1}); break;