We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 010f6a5 commit 16a9ea4Copy full SHA for 16a9ea4
1 file changed
cursive-core/src/views/edit_view.rs
@@ -601,8 +601,14 @@ impl View for EditView {
601
}
602
603
604
+ fn required_size(&mut self, constraint: Vec2) -> Vec2 {
605
+ let content_width = self.content.width();
606
+ constraint.or_min((content_width + 1, 1))
607
+ }
608
+
609
fn layout(&mut self, size: Vec2) {
610
self.last_length = size.x;
611
+ self.keep_cursor_in_view();
612
613
614
fn take_focus(&mut self, _: Direction) -> Result<EventResult, CannotFocus> {
0 commit comments