diff options
| author | tomsmeding <tom.smeding@gmail.com> | 2017-01-09 13:52:21 +0100 | 
|---|---|---|
| committer | tomsmeding <tom.smeding@gmail.com> | 2017-01-09 13:57:30 +0100 | 
| commit | de013a7b1e16f021b3bc97818a5d7007ea0a92e9 (patch) | |
| tree | fa109052097869cc608ea09051afca851f77d243 | |
| parent | 6ea066b983b627e12ab5b8e8ed08aa5b339bb9f0 (diff) | |
Newlines
| -rw-r--r-- | buffer.cpp | 6 | ||||
| -rw-r--r-- | config.cpp | 3 | 
2 files changed, 8 insertions, 1 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");  	} @@ -7,7 +7,8 @@ using namespace std;  Keybindings global_keybindings={ -	{KEY_CTRL+'Q',{"quit_app"}} +	{KEY_CTRL+'Q',{"quit_app"}}, +	{'\n',{"insert_newline"}},  };  class Init{public: Init(){ | 
