Minor fix for cursor movement.
This commit is contained in:
parent
bf099d0f6d
commit
c1c33ae618
|
@ -97,6 +97,8 @@ impl Editor {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn cursor_left(&mut self) {
|
pub fn cursor_left(&mut self) {
|
||||||
|
let p = self.buffer.pos_2d_to_closest_1d(self.cursor);
|
||||||
|
self.cursor = self.buffer.pos_1d_to_closest_2d(p);
|
||||||
if self.cursor.1 > 0 {
|
if self.cursor.1 > 0 {
|
||||||
self.cursor.1 -= 1;
|
self.cursor.1 -= 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user