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;
|
||||
|
||||
// check format
|
||||
if (pattern) {
|
||||
if (pattern && len > 0) {
|
||||
word->type = wordType(p, len);
|
||||
} else {
|
||||
word->type = WT_TEXT;
|
||||
|
@ -577,12 +577,9 @@ void parseCommand(SWords* command, bool pattern) {
|
|||
while (word->next) {
|
||||
word = word->next;
|
||||
}
|
||||
int len = i - start;
|
||||
if (len > 0) {
|
||||
word->next = addWord(p + start, len, pattern);
|
||||
word->next = addWord(p + start, i - start, pattern);
|
||||
command->count++;
|
||||
}
|
||||
}
|
||||
start = i + 1;
|
||||
} else {
|
||||
lastBlank = false;
|
||||
|
|
Loading…
Reference in New Issue