1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02:00

Fix a lint renderering issue

Summary: Currently there is an issue when renderering linter messages with `ArcanistConsoleLintRenderer` if `$message->getChar()` returns `0` (i.e. the value is unset).

Test Plan:
**Before**
{F265586}

**After**
{F265587}

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11319
This commit is contained in:
Joshua Spence 2015-01-12 06:49:14 +11:00
parent c2a9d88711
commit 564dab0989

View file

@ -152,7 +152,7 @@ final class ArcanistConsoleLintRenderer extends ArcanistLintRenderer {
$data = substr_replace(
$data,
phutil_console_format('##%s##', $text_line),
($cursor == $line_num ? $start : 0),
($cursor == $line_num ? ($start > 0 ? $start : null) : 0),
strlen($text_line));
}