1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-03 12:16:44 +02:00

Enable multiline input

Adds a nonl() call to avoid translation from \r to \n when pressing
enter.
C-J -> \n
Enter -> \r
To allow multiline input, \n chars (e.g. when pressing C-J) are replaced
with a pilcrow. After hitting enter, every pilcrow is substituted with
\n again.
This commit is contained in:
Marvin Ewald
2015-12-04 20:15:31 +01:00
parent eb02424f8a
commit e6f839f9ac
11 changed files with 112 additions and 64 deletions

View File

@ -200,6 +200,7 @@ static void init_term(void)
cbreak();
keypad(stdscr, 1);
noecho();
nonl();
timeout(100);
if (has_colors()) {