aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs8
-rw-r--r--helix-term/src/commands/typed.rs4
2 files changed, 6 insertions, 6 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 8af5a7e3..4eb9742f 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -3302,7 +3302,7 @@ fn undo(cx: &mut Context) {
let count = cx.count();
let (view, doc) = current!(cx.editor);
for _ in 0..count {
- if !doc.undo(view) {
+ if !doc.undo(view.id) {
cx.editor.set_status("Already at oldest change");
break;
}
@@ -3313,7 +3313,7 @@ fn redo(cx: &mut Context) {
let count = cx.count();
let (view, doc) = current!(cx.editor);
for _ in 0..count {
- if !doc.redo(view) {
+ if !doc.redo(view.id) {
cx.editor.set_status("Already at newest change");
break;
}
@@ -3325,7 +3325,7 @@ fn earlier(cx: &mut Context) {
let (view, doc) = current!(cx.editor);
for _ in 0..count {
// rather than doing in batch we do this so get error halfway
- if !doc.earlier(view, UndoKind::Steps(1)) {
+ if !doc.earlier(view.id, UndoKind::Steps(1)) {
cx.editor.set_status("Already at oldest change");
break;
}
@@ -3337,7 +3337,7 @@ fn later(cx: &mut Context) {
let (view, doc) = current!(cx.editor);
for _ in 0..count {
// rather than doing in batch we do this so get error halfway
- if !doc.later(view, UndoKind::Steps(1)) {
+ if !doc.later(view.id, UndoKind::Steps(1)) {
cx.editor.set_status("Already at newest change");
break;
}
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index b8f99ff3..475f14d1 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -481,7 +481,7 @@ fn earlier(
let uk = args.join(" ").parse::<UndoKind>().map_err(|s| anyhow!(s))?;
let (view, doc) = current!(cx.editor);
- let success = doc.earlier(view, uk);
+ let success = doc.earlier(view.id, uk);
if !success {
cx.editor.set_status("Already at oldest change");
}
@@ -500,7 +500,7 @@ fn later(
let uk = args.join(" ").parse::<UndoKind>().map_err(|s| anyhow!(s))?;
let (view, doc) = current!(cx.editor);
- let success = doc.later(view, uk);
+ let success = doc.later(view.id, uk);
if !success {
cx.editor.set_status("Already at newest change");
}