Implement left/right
This commit is contained in:
parent
66a138379f
commit
8010b8c0ab
1 changed files with 16 additions and 2 deletions
|
|
@ -413,10 +413,24 @@ impl<'a> TextBuffer<'a> {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
TextAction::Left => {
|
TextAction::Left => {
|
||||||
todo!("left");
|
let rtl_opt = self.lines[self.cursor.line.get()].shape_opt.as_ref().map(|shape| shape.rtl);
|
||||||
|
if let Some(rtl) = rtl_opt {
|
||||||
|
if rtl {
|
||||||
|
self.action(TextAction::Next);
|
||||||
|
} else {
|
||||||
|
self.action(TextAction::Previous);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
TextAction::Right => {
|
TextAction::Right => {
|
||||||
todo!("right");
|
let rtl_opt = self.lines[self.cursor.line.get()].shape_opt.as_ref().map(|shape| shape.rtl);
|
||||||
|
if let Some(rtl) = rtl_opt {
|
||||||
|
if rtl {
|
||||||
|
self.action(TextAction::Previous);
|
||||||
|
} else {
|
||||||
|
self.action(TextAction::Next);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
TextAction::Up => {
|
TextAction::Up => {
|
||||||
todo!("up");
|
todo!("up");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue