1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 00:32:41 +01:00

Initialize used variable in lint console renderer

This commit is contained in:
vrana 2013-02-25 16:23:27 -08:00
parent 9d92253903
commit 2464f54ecf

View file

@ -89,9 +89,9 @@ final class ArcanistLintConsoleRenderer extends ArcanistLintRenderer {
}
$text = $message->getOriginalText();
$start = $message->getChar() - 1;
// Refine original and replacement text to eliminate start and end in common
if ($message->isPatchable()) {
$start = $message->getChar() - 1;
$patch = $message->getReplacementText();
$text_strlen = strlen($text);
$patch_strlen = strlen($patch);
@ -152,9 +152,7 @@ final class ArcanistLintConsoleRenderer extends ArcanistLintRenderer {
$data = substr_replace(
$data,
phutil_console_format('##%s##', $text_line),
($cursor == $line_num)
? ($message->isPatchable() ? $start : $message->getChar() - 1)
: 0,
($cursor == $line_num ? $start : 0),
strlen($text_line));
}