From 20c1a1e310cadb7b94e86a5923b8657a791a48ea Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 18 Feb 2022 12:20:59 +0100 Subject: [PATCH] Use theme to highlight in-progress rename --- crates/editor/src/editor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 79f2dac0ec..20126bb89e 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -4108,6 +4108,7 @@ impl Editor { let lookahead = buffer_offset_range.end.saturating_sub(buffer_offset); this.update(&mut cx, |this, cx| { + let settings = (this.build_settings)(cx); let buffer = this.buffer.read(cx).read(cx); let offset = position.to_offset(&buffer); let start = offset - lookbehind; @@ -4122,7 +4123,11 @@ impl Editor { first_transaction: None, }); this.select_ranges([start..end], None, cx); - this.highlight_ranges::(vec![rename_range], Color::red(), cx); + this.highlight_ranges::( + vec![rename_range], + settings.style.highlighted_line_background, + cx, + ); }); }