Skip to content

Commit b500cd8

Browse files
committed
Fix panic when mouse-scrolling a text_editor
1 parent 200e267 commit b500cd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphics/src/text/editor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ impl editor::Editor for Editor {
452452
font_system.raw(),
453453
cosmic_text::Action::Scroll {
454454
pixels: lines as f32
455-
* self.buffer().metrics().line_height,
455+
* buffer_from_editor(editor).metrics().line_height,
456456
},
457457
);
458458
}

0 commit comments

Comments
 (0)