diff options
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r-- | helix-term/src/commands.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 4a7b7883..2f41a2dc 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -501,7 +501,7 @@ impl std::str::FromStr for MappableCommand { fn from_str(s: &str) -> Result<Self, Self::Err> { if let Some(suffix) = s.strip_prefix(':') { - let mut typable_command = suffix.split(' ').into_iter().map(|arg| arg.trim()); + let mut typable_command = suffix.split(' ').map(|arg| arg.trim()); let name = typable_command .next() .ok_or_else(|| anyhow!("Expected typable command name"))?; @@ -1470,7 +1470,7 @@ pub fn scroll(cx: &mut Context, offset: usize, direction: Direction) { let cursor = range.cursor(text); let height = view.inner_height(); - let scrolloff = config.scrolloff.min(height.saturating_sub(1) as usize / 2); + let scrolloff = config.scrolloff.min(height.saturating_sub(1) / 2); let offset = match direction { Forward => offset as isize, Backward => -(offset as isize), |