summaryrefslogtreecommitdiff
path: root/src/ui/command.c
diff options
context:
space:
mode:
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) {