Only look into lines with at least 2 chars
This commit is contained in:
parent
fe125532a4
commit
8949b857c4
|
@ -54,7 +54,7 @@ int main()
|
||||||
{
|
{
|
||||||
const auto line_nc{remove_colors(line)};
|
const auto line_nc{remove_colors(line)};
|
||||||
// Don't color +++ and --- lines
|
// Don't color +++ and --- lines
|
||||||
if (line_nc[2] != '+' && line_nc[2] != '-')
|
if (line.length() >= 2 && (line_nc[2] != '+' && line_nc[2] != '-'))
|
||||||
{
|
{
|
||||||
if (line_nc[1] == '+')
|
if (line_nc[1] == '+')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue