Reset first_line when changing files.
This commit is contained in:
parent
915fd9ebaf
commit
4b176caded
1 changed files with 3 additions and 2 deletions
|
@ -90,8 +90,9 @@ impl Editor {
|
|||
use crate::tree::Layout;
|
||||
match action {
|
||||
Action::Replace => {
|
||||
self.view_mut().doc = id;
|
||||
// TODO: reset selection?
|
||||
let view = self.view_mut();
|
||||
view.doc = id;
|
||||
view.first_line = 0;
|
||||
return Ok(id);
|
||||
}
|
||||
Action::HorizontalSplit => {
|
||||
|
|
Loading…
Reference in a new issue