summaryrefslogtreecommitdiff
path: root/src/ui/command.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-08 07:49:08 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-08 07:49:08 +0300
commit5ae35b010cfb44d3930cfc900bc71ff2449d39f7 (patch)
treed126e1cb97194ebcc1ea4e136c3a39ddb90798c8 /src/ui/command.c
parent92efe35c6b1ef4bea6aa1e43faf42610c1597340 (diff)
LookupWidget: Identities lookup and commands
Diffstat (limited to 'src/ui/command.c')
-rw-r--r--src/ui/command.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/command.c b/src/ui/command.c
index cf8c7032..44e66121 100644
--- a/src/ui/command.c
+++ b/src/ui/command.c
@@ -96,12 +96,16 @@ iString *suffix_Command(const char *cmd, const char *label) {
96} 96}
97 97
98const iString *string_Command(const char *cmd, const char *label) { 98const iString *string_Command(const char *cmd, const char *label) {
99 return collect_String(newRange_String(range_Command(cmd, label)));
100}
101
102iRangecc range_Command(const char *cmd, const char *label) {
99 iRangecc val = { suffixPtr_Command(cmd, label), NULL }; 103 iRangecc val = { suffixPtr_Command(cmd, label), NULL };
100 if (val.start) { 104 if (val.start) {
101 for (val.end = val.start; *val.end && !isspace(*val.end); val.end++) {} 105 for (val.end = val.start; *val.end && !isspace(*val.end); val.end++) {}
102 return collect_String(newRange_String(val)); 106 return val;
103 } 107 }
104 return collectNew_String(); 108 return iNullRange;
105} 109}
106 110
107iInt2 dir_Command(const char *cmd) { 111iInt2 dir_Command(const char *cmd) {