microsoft / microsoft/vscode

Markdown Editor: allow scrolling beyond the last line (respect editor.scrollBeyondLastLine)

Open
#332,422 0 comments 0 reactions 1 assignee Claimed by @hediet View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

VS Code Version: 1.134.0 (110a328, arm64)
OS Version: macOS 26.5.2

### Feature request

The new built-in Markdown Editor (vscode.markdown.editor) stops scrolling when the last line reaches the bottom edge of the viewport. Please make it possible to scroll the end of the document up to the top of the window, as the text editor does when editor.scrollBeyondLastLine is enabled.

### Motivation

When writing prose in the Markdown Editor, the line you are working on is pinned to the very bottom edge of the window once you reach the end of the document — which for a writer is most of the time. The common workaround is adding meaningless blank lines at the end of the file just to push the working line up the screen.

### Current behavior

Both of the other built-in ways to view markdown already support this:

The text editor honors editor.scrollBeyondLastLine (default true).
The Markdown Preview honors the same setting (the extension reads editor.scrollBeyondLastLine and applies a scrollBeyondLastLine class to the preview body).
The Markdown Editor is the only one that ignores it: its webview scroll container (#editor { height: 100%; overflow: scroll } in markdown-editor-src/markdownEditor.css) ends exactly at the document's end, and markdown-editor-out contains no scroll-beyond handling.

### Suggestion

Honor the existing editor.scrollBeyondLastLine setting in the Markdown Editor — e.g. by adding viewport-height bottom padding/margin to the scroll container when the setting is enabled — rather than introducing a new setting, so behavior stays consistent across the three markdown surfaces.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.