In theme, add an InputEditorSyle for styling small editors
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
co-authored by
Antonio Scandurra
parent
f59e02cf25
commit
1c43121ae0
+6
-1
@@ -2397,6 +2397,7 @@ impl Snapshot {
|
||||
pub fn layout_lines(
|
||||
&mut self,
|
||||
mut rows: Range<u32>,
|
||||
style: &EditorStyle,
|
||||
font_cache: &FontCache,
|
||||
layout_cache: &TextLayoutCache,
|
||||
) -> Result<Vec<text_layout::Line>> {
|
||||
@@ -2433,7 +2434,11 @@ impl Snapshot {
|
||||
}
|
||||
|
||||
if !line_chunk.is_empty() && !line_exceeded_max_len {
|
||||
let style = self.theme.syntax.highlight_style(style_ix);
|
||||
let style = self
|
||||
.theme
|
||||
.syntax
|
||||
.highlight_style(style_ix)
|
||||
.unwrap_or(style.text.clone());
|
||||
// Avoid a lookup if the font properties match the previous ones.
|
||||
let font_id = if style.font_properties == prev_font_properties {
|
||||
prev_font_id
|
||||
|
||||
Reference in New Issue
Block a user