Skip to content

Commit

Permalink
fix: ctrl+g scroll state being lost when restoring editor (#545)
Browse files Browse the repository at this point in the history
Fixes #458
  • Loading branch information
connor4312 authored Nov 1, 2024
1 parent e39b16d commit 9aefbec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions media/editor/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ export const offset = atom({

registerHandler(MessageType.GoToOffset, msg => {
const s = fx.getLoadable(columnWidth).getValue();
vscode.setState({ ...vscode.getState(), offset: msg.offset });
fx.setSelf(startOfRowContainingByte(msg.offset, s));
});
},
Expand Down

0 comments on commit 9aefbec

Please sign in to comment.