diff options
Diffstat (limited to 'buffer.cpp')
-rw-r--r-- | buffer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -35,6 +35,12 @@ void Buffer::receive(const Command &cmd){ } //TODO: optimise this renewLayout(screen[0].line,screen[0].part,lastWidth,lastHeight); + } else if(cmd[0]=="insert_newline"){ + tb.insert(cursor.line,cursor.x,'\n'); + cursor.x=0; + cursor.line++; + //TODO: optimise this + renewLayout(screen[0].line,screen[0].part,lastWidth,lastHeight); } else { THROW("Unknown command"); } |