mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
color_string_internal to use a sentinel value that's definitely invalid
I think -1 is slightly more elegant than 0 because 0 could be a valid offset. No functional change.
This commit is contained in:
parent
5868b3c380
commit
f82537bcdc
1 changed files with 1 additions and 1 deletions
|
@ -552,7 +552,7 @@ static void color_string_internal(const wcstring &buffstr, highlight_spec_t base
|
|||
|
||||
enum { e_unquoted, e_single_quoted, e_double_quoted } mode = e_unquoted;
|
||||
// For some ungodly reason making this a maybe<size_t> makes gcc grumpy
|
||||
size_t unclosed_quote_offset = 0;
|
||||
auto unclosed_quote_offset = std::numeric_limits<size_t>::max();
|
||||
int bracket_count = 0;
|
||||
for (size_t in_pos = 0; in_pos < buff_len; in_pos++) {
|
||||
const wchar_t c = buffstr.at(in_pos);
|
||||
|
|
Loading…
Reference in a new issue