Fix clipping when dragging the mouse with vim-mode enabled and adjust single line editor selections
This commit is contained in:
parent
c2868a39e8
commit
1cfaac1bc5
9 changed files with 36 additions and 43 deletions
|
@ -238,6 +238,8 @@ impl Line {
|
|||
None
|
||||
}
|
||||
|
||||
// If round_to_closest, find the closest index to the given x position
|
||||
// If !round_to_closest, find the largest index before the given x position
|
||||
pub fn index_for_x(&self, x: f32) -> Option<usize> {
|
||||
if x >= self.layout.width {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue