Fix merge conflict
Some checks failed
timw4mail/php-kilo/master There was a failure building this commit

This commit is contained in:
Timothy Warren 2020-02-05 14:51:42 -05:00
commit 366945bda1
2 changed files with 8 additions and 6 deletions

4
composer.lock generated
View File

@ -1487,7 +1487,11 @@
},
{
"name": "symfony/yaml",
<<<<<<< HEAD
"version": "v5.0.4",
=======
"version": "v5.0.3",
>>>>>>> 60b1cca69588ba4af02246586f5e3c86eeeddd65
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",

View File

@ -448,20 +448,18 @@ class Editor {
$current = 0;
}
$row = $this->rows[$current];
$match = strpos($row->render, $query);
$match = strpos($this->rows[$current]->render, $query);
if ($match !== FALSE)
{
$lastMatch = $current;
$this->cursorY = $current;
$this->cursorX = $this->rowRxToCx($row, $match);
$this->cursorX = $this->rowRxToCx($this->rows[$current], $match);
$this->rowOffset = $this->numRows;
$savedHlLine = $current;
$savedHl = $row->hl;
$savedHl = $this->rows[$current]->hl;
// Update the highlight array of the relevant row with the 'MATCH' type
array_replace_range($row->hl, $match, strlen($query), Highlight::MATCH);
array_replace_range($this->rows[$current]->hl, $match, strlen($query), Highlight::MATCH);
break;
}