fix: fix can not scroll enum item with blank
This commit is contained in:
parent
4976c80e2f
commit
a0ae611a99
|
@ -536,7 +536,7 @@ SWord* addWord(const char* p, int32_t len, bool pattern) {
|
||||||
word->len = len;
|
word->len = len;
|
||||||
|
|
||||||
// check format
|
// check format
|
||||||
if (pattern) {
|
if (pattern && len > 0) {
|
||||||
word->type = wordType(p, len);
|
word->type = wordType(p, len);
|
||||||
} else {
|
} else {
|
||||||
word->type = WT_TEXT;
|
word->type = WT_TEXT;
|
||||||
|
@ -577,11 +577,8 @@ void parseCommand(SWords* command, bool pattern) {
|
||||||
while (word->next) {
|
while (word->next) {
|
||||||
word = word->next;
|
word = word->next;
|
||||||
}
|
}
|
||||||
int len = i - start;
|
word->next = addWord(p + start, i - start, pattern);
|
||||||
if (len > 0) {
|
command->count++;
|
||||||
word->next = addWord(p + start, len, pattern);
|
|
||||||
command->count++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
start = i + 1;
|
start = i + 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue