mirror of https://github.com/helix-editor/helix
Reset first_line when changing files.
parent
915fd9ebaf
commit
4b176caded
|
@ -90,8 +90,9 @@ impl Editor {
|
||||||
use crate::tree::Layout;
|
use crate::tree::Layout;
|
||||||
match action {
|
match action {
|
||||||
Action::Replace => {
|
Action::Replace => {
|
||||||
self.view_mut().doc = id;
|
let view = self.view_mut();
|
||||||
// TODO: reset selection?
|
view.doc = id;
|
||||||
|
view.first_line = 0;
|
||||||
return Ok(id);
|
return Ok(id);
|
||||||
}
|
}
|
||||||
Action::HorizontalSplit => {
|
Action::HorizontalSplit => {
|
||||||
|
|
Loading…
Reference in New Issue