summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d1cbdd)
raw | patch | inline | side by side (parent: 2d1cbdd)
author | Andreas Obergrusberger <tradiaz@yahoo.de> | |
Sun, 26 Aug 2007 19:28:30 +0000 (19:28 +0000) | ||
committer | Andreas Obergrusberger <tradiaz@yahoo.de> | |
Sun, 26 Aug 2007 19:28:30 +0000 (19:28 +0000) |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@6817 09075e82-0dd4-0310-85a5-a0d7c8717e4f
src/wreadln.c | patch | blob | history |
diff --git a/src/wreadln.c b/src/wreadln.c
index 8694bb367a8dcc8a531f1a4ae609ea9ace6115e0..fd653329b06f1d1f4210df4b804c969ba6da57bb 100644 (file)
--- a/src/wreadln.c
+++ b/src/wreadln.c
#define KEY_CTRL_E 5
#define KEY_CTRL_G 7
#define KEY_CTRL_K 11
+#define KEY_CTRL_U 21
#define KEY_CTRL_Z 26
#define KEY_BCKSPC 8
#define TAB 9
case KEY_CTRL_K:
line[cursor] = 0;
break;
+ case KEY_CTRL_U:
+ cursor = my_strlen(line);
+ for (i = 0;i < cursor; i++)
+ line[i] = '\0';
+ cursor = 0;
+ break;
case 127:
case KEY_BCKSPC: /* handle backspace: copy all */
case KEY_BACKSPACE: /* chars starting from curpos */
case KEY_CTRL_K:
wline[cursor] = 0;
break;
+ case KEY_CTRL_U:
+ cursor = wcslen(wline);
+ for (i = 0;i < cursor; i++)
+ wline[i] = '\0';
+ cursor = 0;
+ break;
case KEY_CTRL_Z:
sigstop();
break;