Fix cursor offset with Affinity::After at the end of lines in Editor::cursor
This commit is contained in:
parent
abab144857
commit
4389ab9865
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue