Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl Document {
};
for _ in start..end {
if let Some(row) = self.rows.get(position.y) {
if let Some(x) = row.find(&query, position.x, direction) {
if let Some(x) = row.find(query, position.x, direction) {
position.x = x;
return Some(position);
}
Expand Down Expand Up @@ -161,7 +161,7 @@ impl Document {
#[allow(clippy::indexing_slicing)]
for row in &mut self.rows[..until] {
start_with_comment = row.highlight(
&self.file_type.highlighting_options(),
self.file_type.highlighting_options(),
word,
start_with_comment,
);
Expand Down
2 changes: 1 addition & 1 deletion src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl Editor {
if let Some(position) =
editor
.document
.find(&query, &editor.cursor_position, direction)
.find(query, &editor.cursor_position, direction)
{
editor.cursor_position = position;
editor.scroll();
Expand Down
8 changes: 4 additions & 4 deletions src/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ impl Row {
}
}

if self.highlight_str(index, &word, chars, hl_type) {
if self.highlight_str(index, word, chars, hl_type) {
return true;
}
}
Expand Down Expand Up @@ -437,15 +437,15 @@ impl Row {
index = closing_index;
}
while let Some(c) = chars.get(index) {
if self.highlight_multiline_comment(&mut index, &opts, *c, &chars) {
if self.highlight_multiline_comment(&mut index, opts, *c, &chars) {
in_ml_comment = true;
continue;
}
in_ml_comment = false;
if self.highlight_char(&mut index, opts, *c, &chars)
|| self.highlight_comment(&mut index, opts, *c, &chars)
|| self.highlight_primary_keywords(&mut index, &opts, &chars)
|| self.highlight_secondary_keywords(&mut index, &opts, &chars)
|| self.highlight_primary_keywords(&mut index, opts, &chars)
|| self.highlight_secondary_keywords(&mut index, opts, &chars)
|| self.highlight_string(&mut index, opts, *c, &chars)
|| self.highlight_number(&mut index, opts, *c, &chars)
{
Expand Down