Fix clipping when dragging the mouse with vim-mode enabled and adjust single line editor selections

This commit is contained in:
K Simmons 2022-07-18 13:33:55 -07:00
parent c2868a39e8
commit 1cfaac1bc5
9 changed files with 36 additions and 43 deletions

View file

@ -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