Fix initially backgrounded jobs. Fixes #1373

This commit is contained in:
ridiculousfish
2014-03-28 14:39:47 -07:00
parent c1f64ba017
commit 005edf71a8
5 changed files with 25 additions and 8 deletions

View File

@@ -960,7 +960,7 @@ public:
void highlighter_t::color_node(const parse_node_t &node, highlight_spec_t color)
{
// Can only color nodes with valid source ranges
if (! node.has_source())
if (! node.has_source() || node.source_length == 0)
return;
// Fill the color array with our color in the corresponding range
@@ -1356,6 +1356,7 @@ const highlighter_t::color_array_t & highlighter_t::highlight()
case parse_token_type_background:
case parse_token_type_end:
case symbol_optional_background:
{
this->color_node(node, highlight_spec_statement_terminator);
}