@@ -5800,28 +5800,26 @@ fn decrement(cx: &mut Context) {
5800fn increment_impl(cx: &mut Context, amount: i64) {
5800fn increment_impl(cx: &mut Context, amount: i64) {
5801 let (view, doc) = current!(cx.editor);
5801 let (view, doc) = current!(cx.editor);
5802 let selection = doc.selection(view.id);
5802 let selection = doc.selection(view.id);
5803− let text = doc.text();
5803+ let text = doc.text().slice(..);
5805− let changes = selection
5805+ let changes: Vec<_> = selection
5806 .ranges()
5806 .ranges()
5808 .filter_map(|range| {
5808 .filter_map(|range| {
5809− let incrementor: Box<dyn Increment> = if let Some(incrementor) =
5809+ let incrementor: Box<dyn Increment> =
5810− DateTimeIncrementor::from_range(text.slice(..), *range)
5810+ if let Some(incrementor) = DateTimeIncrementor::from_range(text, *range) {
5812− Box::new(incrementor)
5811+ Box::new(incrementor)
5813− } else if let Some(incrementor) = NumberIncrementor::from_range(text.slice(..), *range)
5812+ } else if let Some(incrementor) = NumberIncrementor::from_range(text, *range) {
5815− Box::new(incrementor)
5813+ Box::new(incrementor)
5816− } else {
5814+ } else {
5817− return None;
5815+ return None;
5820 let (range, new_text) = incrementor.increment(amount);
5818 let (range, new_text) = incrementor.increment(amount);
5822 Some((range.from(), range.to(), Some(new_text)))
5820 Some((range.from(), range.to(), Some(new_text)))
5824− .collect::<Vec<_>>();
5822+ .collect();
5826 // Overlapping changes in a transaction will panic, so we need to find and remove them.
5824 // Overlapping changes in a transaction will panic, so we need to find and remove them.
5827 // For example, if there are cursors on each of the year, month, and day of `2021-11-29`,
5825 // For example, if there are cursors on each of the year, month, and day of `2021-11-29`,