Use theme to highlight in-progress rename
This commit is contained in:
parent
a682ebb08d
commit
20c1a1e310
1 changed files with 6 additions and 1 deletions
|
@ -4108,6 +4108,7 @@ impl Editor {
|
||||||
let lookahead = buffer_offset_range.end.saturating_sub(buffer_offset);
|
let lookahead = buffer_offset_range.end.saturating_sub(buffer_offset);
|
||||||
|
|
||||||
this.update(&mut cx, |this, cx| {
|
this.update(&mut cx, |this, cx| {
|
||||||
|
let settings = (this.build_settings)(cx);
|
||||||
let buffer = this.buffer.read(cx).read(cx);
|
let buffer = this.buffer.read(cx).read(cx);
|
||||||
let offset = position.to_offset(&buffer);
|
let offset = position.to_offset(&buffer);
|
||||||
let start = offset - lookbehind;
|
let start = offset - lookbehind;
|
||||||
|
@ -4122,7 +4123,11 @@ impl Editor {
|
||||||
first_transaction: None,
|
first_transaction: None,
|
||||||
});
|
});
|
||||||
this.select_ranges([start..end], None, cx);
|
this.select_ranges([start..end], None, cx);
|
||||||
this.highlight_ranges::<Rename>(vec![rename_range], Color::red(), cx);
|
this.highlight_ranges::<Rename>(
|
||||||
|
vec![rename_range],
|
||||||
|
settings.style.highlighted_line_background,
|
||||||
|
cx,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue