diff options
Diffstat (limited to 'graphics/src/text')
| -rw-r--r-- | graphics/src/text/editor.rs | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/src/text/editor.rs b/graphics/src/text/editor.rs index 7b0ddec1..b39e9831 100644 --- a/graphics/src/text/editor.rs +++ b/graphics/src/text/editor.rs @@ -143,7 +143,10 @@ impl editor::Editor for Editor {                              None                          }                      }) -                    .unwrap_or((0, 0.0)); +                    .unwrap_or(( +                        0, +                        layout.last().map(|line| line.w).unwrap_or(0.0), +                    ));                  let line_height = buffer.metrics().line_height;  | 
