Introduction
Introduction Statistics Contact Development Disclaimer Help
ctrl-w deletes one word - irc - Unnamed repository; edit this file 'description…
git clone git://vernunftzentrum.de/irc.git
Log
Files
Refs
README
---
commit 48569cdb36dd1a71f3221390b8f25e2ec62fecd7
parent 294e0d2522d6044bf68dc232f87d00703c756d17
Author: xcko shrdlu <[email protected]>
Date: Sun, 13 Nov 2016 07:39:39 +0000
ctrl-w deletes one word
Diffstat:
irc.c | 12 ++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/irc.c b/irc.c
@@ -685,6 +685,18 @@ tgetch(void)
dirty = --cu;
len--;
break;
+ case CTRL('w'):
+ if (cu == 0)
+ break;
+ i = 1;
+ while (l[cu - i] == ' ' && cu - i != 0) i++;
+ while (l[cu - i] != ' ' && cu - i != 0) i++;
+ if (cu - i != 0) i--;
+ memmove(&l[cu - i], &l[cu], len - cu);
+ cu -= i;
+ dirty = cu;
+ len -= i;
+ break;
case '\n':
l[len] = 0;
uparse(l);
You are viewing proxied material from vernunftzentrum.de. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.