Create new block at the end and scroll down to only show the new block#412
Merged
Create new block at the end and scroll down to only show the new block#412
Conversation
This makes it possible to be fully scrolled down so that only the last block is within the viewport, and edit/move around the cursor without the scroll margin causing the block above to become visible.
…d then scrolls down all the way so that only the new block is visible. Make this the default bound command for C-Shift-Enter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #399
This PR adds a new command (
Add new block after last, and scroll down) and changes the default key binding forC+Shift+Enterto use it. This commands inserts a new block at the end of the buffer, and then scrolls down so that only the newly created block is visible.In addition, this PR fixes so that we use a dynamic top scrollMargin when the cursor is in the last block. This prevents the viewport to "jump up" when editing/moving the cursor on the first line(s) of the last block when we're fully scrolled down.