Skip to content

const hasWordWrap: boolean = (editor as vscode.TextEditor).options.wordWrap; #186837

Open
@solomonkinard

Description

Add ability to detect if the current editor has word wrap turned on. Otherwise editor.setDecoration() is broken by putting items at the end of the wrapped line, instead of at the end of the first line. Example extension.

Example code:
const hasWordWrap: boolean = (editor as vscode.TextEditor).options.wordWrap;

Semi-related:
Add wordwrap indicator
Add support for language-aware word wrap

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

editor-wrappingEditor line wrapping issuesfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions