summaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 4869a135..c89c81db 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -5803,17 +5803,17 @@ fn increment_impl(cx: &mut Context, amount: i64) {
let text = doc.text();
let changes = selection.ranges().iter().filter_map(|range| {
- let incrementor: Option<Box<dyn Increment>> = if let Some(incrementor) =
+ let incrementor: Box<dyn Increment> = if let Some(incrementor) =
DateTimeIncrementor::from_range(text.slice(..), *range)
{
- Some(Box::new(incrementor))
+ Box::new(incrementor)
} else if let Some(incrementor) = NumberIncrementor::from_range(text.slice(..), *range) {
- Some(Box::new(incrementor))
+ Box::new(incrementor)
} else {
- None
+ return None;
};
- let (range, new_text) = incrementor?.increment(amount);
+ let (range, new_text) = incrementor.increment(amount);
Some((range.from(), range.to(), Some(new_text)))
});