mirror of https://github.com/lapce/lapce.git
fix(view): autosave periodically resetting scroll (#1476)
This commit is contained in:
parent
d5560f8f32
commit
181764f96c
|
@ -744,13 +744,17 @@ fn event(
|
|||
{
|
||||
ctx.set_handled();
|
||||
}
|
||||
self.ensure_cursor_visible(
|
||||
ctx,
|
||||
&editor_data,
|
||||
&data.panel,
|
||||
None,
|
||||
env,
|
||||
);
|
||||
|
||||
// We don't want to send this on `FocusCommand::Save`, especially when autosave is enabled.
|
||||
if command.kind != CommandKind::Focus(FocusCommand::Save) {
|
||||
self.ensure_cursor_visible(
|
||||
ctx,
|
||||
&editor_data,
|
||||
&data.panel,
|
||||
None,
|
||||
env,
|
||||
);
|
||||
}
|
||||
}
|
||||
Event::Command(cmd) if cmd.is(LAPCE_UI_COMMAND) => {
|
||||
let cmd = cmd.get_unchecked(LAPCE_UI_COMMAND);
|
||||
|
|
Loading…
Reference in New Issue