Skip to content

Changing textEditor size breaks wrap on newline feature #258022

@RedCMD

Description

@RedCMD

Just want to say I love the new wrap on newline feature

however when changing the size of the textEditor, it breaks the feature
returning back to normal wordwrap

and completely destroys the editor in large files

Steps to Reproduce:

  1. enable setting "editor.wrapOnEscapedLineFeeds": true
  2. open JSON file containing strings with newlines
  3. enable word wrap
  4. change the size of the textEditor
  5. notice editor.wrapOnEscapedLineFeeds stops working
{
	"patterns": [
		{
			"comment": "Single-line regular expression literals must be matched all in one go\n in order to avoid ambiguities with operators, and to adhere to certain\n parsing rules in SE-0354/SE-0355, such as:\n - A regex literal will not be parsed if it contains an unbalanced ).\n - A regex may end with a space only if it began with an escaped space",
			"name": "string.regexp.line.swift",
			"match": "(?x)\n(/)\n(?!\\s)         # non-extended regex literals may not start with a space or tab\n(?!/)          # disambiguation with line comments (redundant since comment rules occur earlier)\n(?:\n  \\\\\\s(?=/)    # may end with a space only if it contains only a single escaped space, i.e. /\\ /\n  | (?<guts>\n    (?>   # no backtracking, avoids issues with negative lookbehind at end\n      (?:\n        \\\\Q\n          (?:(?!\\\\E)(?!/).)*+\n          # A quoted sequence may not have a closing E, in which case it extends to the end of the regex\n          (?:\\\\E | (?=/))\n        | \\\\.\n        | \\(\\?\\#[^)]*\\)\n        | \\(\\?\n            # InterpolatedCallout\n            (?>(\\{(?:\\g<-1>|(?!{).*?)\\}))\n            (?:\\[(?!\\d)\\w+\\])?\n            [X<>]?\n          \\)\n        | (?<class>\\[ (?:\\\\. | [^\\[\\]] | \\g<class>)+ \\])\n        | \\(\\g<guts>?+\\)\n        | (?:(?!/)[^()\\[\\\\])+  # any character (until end)\n      )+\n    )\n  )?+\n  (?<!\\s)\n)\n(/)",
			"captures": {
				"0": { "patterns": [ { "include": "#literals-regular-expression-literal-regex-guts" } ] },
				"1": { "name": "punctuation.definition.string.begin.regexp.swift" },
				"3": { "name": "punctuation.definition.string.end.regexp.swift" }
			}
		}
	]
}

Expected:
wraps on \n
Image

Actual:
stops wrapping after page zoom
Image
Image

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

Labels

insiders-releasedPatch has been released in VS Code Insiders

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions