diff options
author | Frederic Culot <calcurse@culot.org> | 2006-09-17 10:45:06 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2006-09-17 10:45:06 +0000 |
commit | fd02fafb2ede1b679477bf1df45411b22d4499c8 (patch) | |
tree | cc5994d27188f2f62d8aa312c579ae4501254e92 /src | |
parent | 3340d3da933b4492a703455e1937c18e2b29533e (diff) | |
download | calcurse-fd02fafb2ede1b679477bf1df45411b22d4499c8.tar.gz calcurse-fd02fafb2ede1b679477bf1df45411b22d4499c8.zip |
getstring() improved to check for escape sequence
Diffstat (limited to 'src')
-rwxr-xr-x | src/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c index 166c6c4..20d036e 100755 --- a/src/utils.c +++ b/src/utils.c @@ -1,4 +1,4 @@ -/* $calcurse: utils.c,v 1.9 2006/09/16 15:25:52 culot Exp $ */ +/* $calcurse: utils.c,v 1.10 2006/09/17 10:45:06 culot Exp $ */ /* * Calcurse - text-based organizer @@ -146,6 +146,9 @@ int start_x, start_y; waddch(win, ' '); wmove(win, start_y, start_x + charcount); } + } else if (ch == ESCAPE) { + *string = NULL; + return; } else { *string++ = ch; charcount++; |