diff options
author | Robin | 2021-06-12 12:21:06 +0000 |
---|---|---|
committer | GitHub | 2021-06-12 12:21:06 +0000 |
commit | 44cc0d8eb0743101724fca8787217a9d0aa01bd4 (patch) | |
tree | 388d4b85779f3ebb6e8c8489b563bd05237720f5 /helix-view/src/view.rs | |
parent | 19535888735a97e0a9ccb057ea12f8bbd4dfaa7a (diff) |
add alternate file (#223)
* add alternate file
inspired by vim ctrl-6/kak ga commands. the alternate file is kept per view
* apply feedback from #223
* rename to last_accessed
* add ga doc
* add fail message for ga
Diffstat (limited to 'helix-view/src/view.rs')
-rw-r--r-- | helix-view/src/view.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs index 5d2d27fd..c0a72c78 100644 --- a/helix-view/src/view.rs +++ b/helix-view/src/view.rs @@ -67,6 +67,8 @@ pub struct View { pub first_col: usize, pub area: Rect, pub jumps: JumpList, + /// the last accessed file before the current one + pub last_accessed_doc: Option<DocumentId>, } impl View { @@ -78,6 +80,7 @@ impl View { first_col: 0, area: Rect::default(), // will get calculated upon inserting into tree jumps: JumpList::new((doc, Selection::point(0))), // TODO: use actual sel + last_accessed_doc: None, } } |