diff --git a/src/Editor.php b/src/Editor.php index 439aab1..8797bc5 100644 --- a/src/Editor.php +++ b/src/Editor.php @@ -543,6 +543,10 @@ class Editor { $this->cursorY = $current; $this->cursorX = $this->rowRxToCx($this->rows[$current], $match); $this->rowOffset = $this->numRows; + + // Update the highlight array of the relevant row with the 'MATCH' type + array_replace_range($this->rows[$current]->hl, $match, strlen($query), Highlight::MATCH); + break; } }