|
|
@ -8,14 +8,12 @@ use helix_core::{
|
|
|
|
};
|
|
|
|
};
|
|
|
|
use once_cell::sync::Lazy;
|
|
|
|
use once_cell::sync::Lazy;
|
|
|
|
|
|
|
|
|
|
|
|
use crate::view::View;
|
|
|
|
use crate::view::{View, PADDING};
|
|
|
|
|
|
|
|
|
|
|
|
/// A command is a function that takes the current state and a count, and does a side-effect on the
|
|
|
|
/// A command is a function that takes the current state and a count, and does a side-effect on the
|
|
|
|
/// state (usually by creating and applying a transaction).
|
|
|
|
/// state (usually by creating and applying a transaction).
|
|
|
|
pub type Command = fn(view: &mut View, count: usize);
|
|
|
|
pub type Command = fn(view: &mut View, count: usize);
|
|
|
|
|
|
|
|
|
|
|
|
const PADDING: usize = 5;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub fn move_char_left(view: &mut View, count: usize) {
|
|
|
|
pub fn move_char_left(view: &mut View, count: usize) {
|
|
|
|
// TODO: use a transaction
|
|
|
|
// TODO: use a transaction
|
|
|
|
let selection = view
|
|
|
|
let selection = view
|
|
|
|