about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-03-30 13:27:35 -0400
committerJune McEnroe <june@causal.agency>2020-03-30 13:27:35 -0400
commit407eaf9dbf8ed304cded894cbfcc6a563bc9f5bf (patch)
tree9ef2b290df419cf71302105e354c5153e0689f22
parentAdd /o alias for /open (diff)
downloadcatgirl-407eaf9dbf8ed304cded894cbfcc6a563bc9f5bf.tar.gz
catgirl-407eaf9dbf8ed304cded894cbfcc6a563bc9f5bf.zip
Tab complete from last iswspace
Diffstat (limited to '')
-rw-r--r--edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/edit.c b/edit.c
index 720d7fd..5aa3de4 100644
--- a/edit.c
+++ b/edit.c
@@ -81,7 +81,7 @@ static struct {
 static void tabComplete(uint id) {
 	if (!tab.len) {
 		tab.pos = pos;
-		while (tab.pos && buf[tab.pos - 1] != L' ') tab.pos--;
+		while (tab.pos && !iswspace(buf[tab.pos - 1])) tab.pos--;
 		if (tab.pos == pos) return;
 		tab.pre = pos - tab.pos;
 		tab.len = tab.pre;