aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/history.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/history.rs')
-rw-r--r--helix-core/src/history.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/helix-core/src/history.rs b/helix-core/src/history.rs
index 66445525..99de3f7c 100644
--- a/helix-core/src/history.rs
+++ b/helix-core/src/history.rs
@@ -101,7 +101,7 @@ mod test {
// Need to commit before applying!
history.commit_revision(&transaction1, &state);
transaction1.apply(&mut state);
- assert_eq!("hello world!", state.doc());
+ assert_eq!("hello world!", state.doc);
// ---
@@ -111,7 +111,7 @@ mod test {
// Need to commit before applying!
history.commit_revision(&transaction2, &state);
transaction2.apply(&mut state);
- assert_eq!("hello 世界!", state.doc());
+ assert_eq!("hello 世界!", state.doc);
// ---
fn undo(history: &mut History, state: &mut State) {
@@ -126,15 +126,15 @@ mod test {
}
undo(&mut history, &mut state);
- assert_eq!("hello world!", state.doc());
+ assert_eq!("hello world!", state.doc);
redo(&mut history, &mut state);
- assert_eq!("hello 世界!", state.doc());
+ assert_eq!("hello 世界!", state.doc);
undo(&mut history, &mut state);
undo(&mut history, &mut state);
- assert_eq!("hello", state.doc());
+ assert_eq!("hello", state.doc);
// undo at root is a no-op
undo(&mut history, &mut state);
- assert_eq!("hello", state.doc());
+ assert_eq!("hello", state.doc);
}
}