aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/commands.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-10-14 03:03:10 +0000
committerBlaž Hrastnik2020-10-14 04:35:54 +0000
commit77ff51cef9d7444e5dca92c03f6b12edce659dae (patch)
tree37c27e935f4c399b6b360609cbe648ff7b04c5ab /helix-view/src/commands.rs
parentd64f4beede412dbf77df0e00c478b053a3d6cc54 (diff)
Share the padding definition too.
Diffstat (limited to 'helix-view/src/commands.rs')
-rw-r--r--helix-view/src/commands.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/helix-view/src/commands.rs b/helix-view/src/commands.rs
index ec22950e..7fe9609e 100644
--- a/helix-view/src/commands.rs
+++ b/helix-view/src/commands.rs
@@ -8,14 +8,12 @@ use helix_core::{
};
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
/// state (usually by creating and applying a transaction).
pub type Command = fn(view: &mut View, count: usize);
-const PADDING: usize = 5;
-
pub fn move_char_left(view: &mut View, count: usize) {
// TODO: use a transaction
let selection = view