mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 21:36:22 +00:00
Fix autocompletion of quoted strings - WIP
Needs some refactoring
Need to use unicode functions in:
parser.c
autocomplete.c
This commit is contained in:
@@ -201,8 +201,14 @@ parse_args_with_freetext(const char * const inp, int min, int max)
|
||||
in_quotes = TRUE;
|
||||
i++;
|
||||
}
|
||||
token_start = ©[i];
|
||||
token_size++;
|
||||
if (copy[i] == '"') {
|
||||
token_start = ©[i+1];
|
||||
} else {
|
||||
token_start = ©[i];
|
||||
}
|
||||
if (copy[i] != '"') {
|
||||
token_size++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (in_quotes) {
|
||||
@@ -213,7 +219,9 @@ parse_args_with_freetext(const char * const inp, int min, int max)
|
||||
in_token = FALSE;
|
||||
in_quotes = FALSE;
|
||||
} else {
|
||||
token_size++;
|
||||
if (copy[i] != '"') {
|
||||
token_size++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((!in_freetext && copy[i] == ' ') || copy[i] == '\0') {
|
||||
@@ -222,7 +230,9 @@ parse_args_with_freetext(const char * const inp, int min, int max)
|
||||
token_size = 0;
|
||||
in_token = FALSE;
|
||||
} else {
|
||||
token_size++;
|
||||
if (copy[i] != '"') {
|
||||
token_size++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user