aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorIvan Tham2021-11-11 13:32:44 +0000
committerGitHub2021-11-11 13:32:44 +0000
commit9d591427be900b7a43fc7e13dd86f31199e8c00e (patch)
tree2348bfed1cf794d35bed04fa3156557d5838f021 /helix-term
parentd131a9dd0efc5ff271f8b78cd65a8dc30c193af4 (diff)
Fix earlier/later missing changeset update (#1069)
Fix #1059
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 23b385eb..738621b0 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -1845,7 +1845,10 @@ mod cmd {
.map_err(|s| anyhow!(s))?;
let (view, doc) = current!(cx.editor);
- doc.earlier(view.id, uk);
+ let success = doc.earlier(view.id, uk);
+ if !success {
+ cx.editor.set_status("Already at oldest change".to_owned());
+ }
Ok(())
}
@@ -1860,7 +1863,10 @@ mod cmd {
.parse::<helix_core::history::UndoKind>()
.map_err(|s| anyhow!(s))?;
let (view, doc) = current!(cx.editor);
- doc.later(view.id, uk);
+ let success = doc.later(view.id, uk);
+ if !success {
+ cx.editor.set_status("Already at newest change".to_owned());
+ }
Ok(())
}