mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
Merge branch 'master' into ast
Conflicts: complete.cpp
This commit is contained in:
@@ -710,20 +710,20 @@ enum token_type tok_peek_next(tokenizer_t *tok, wcstring *out_next_string)
|
||||
{
|
||||
out_next_string->clear();
|
||||
}
|
||||
|
||||
|
||||
enum token_type result = TOK_END;
|
||||
if (tok_has_next(tok))
|
||||
{
|
||||
int saved = tok_get_pos(tok);
|
||||
tok_next(tok);
|
||||
result = tok_last_type(tok);
|
||||
|
||||
|
||||
if (out_next_string != NULL)
|
||||
{
|
||||
const wchar_t *last = tok_last(tok);
|
||||
out_next_string->assign(last ? last : L"");
|
||||
}
|
||||
|
||||
|
||||
tok_set_pos(tok, saved);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user