diff options
author | Blaž Hrastnik | 2021-03-24 09:01:26 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-03-24 09:01:26 +0000 |
commit | 8657c57cf2d56b9a89e2f780675426f4c78df48b (patch) | |
tree | cbcda261837dc2bcd3be1e060a6452186fd0acc9 /helix-view/src/editor.rs | |
parent | 4b176cadedfe47fe542e9c6e2defd34b3af984df (diff) |
Trivial jumplist implementation.
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r-- | helix-view/src/editor.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 33e380a0..08dd4d00 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -90,7 +90,11 @@ impl Editor { use crate::tree::Layout; match action { Action::Replace => { + let view = self.view(); + let jump = (view.doc, self.documents[view.doc].selection().clone()); + let view = self.view_mut(); + view.jumps.push(jump); view.doc = id; view.first_line = 0; return Ok(id); |