From ce99d401c28cea3088c178169c47943aa006e38b Mon Sep 17 00:00:00 2001 From: Warren Powell Date: Fri, 19 May 2017 15:55:52 +1200 Subject: [PATCH] Enables MAX_SCREEN_LINE_LENGTH to now be set via a config option in editor settings. Defaults to 500 --- src/config-schema.js | 6 ++++++ src/text-editor-registry.js | 1 + 2 files changed, 7 insertions(+) diff --git a/src/config-schema.js b/src/config-schema.js index fb0164766..00fb8bbe3 100644 --- a/src/config-schema.js +++ b/src/config-schema.js @@ -409,6 +409,12 @@ const configSchema = { minimum: 1, description: 'Identifies the length of a line which is used when wrapping text with the `Soft Wrap At Preferred Line Length` setting enabled, in number of characters.' }, + maxScreenLineLength: { + type: 'integer', + default: 500, + minimum: 500, + description: 'Defines the maximum width of the editor window before soft wrapping is enforced, in number of characters.' + }, tabLength: { type: 'integer', default: 2, diff --git a/src/text-editor-registry.js b/src/text-editor-registry.js index 72aa8b364..35be27fd1 100644 --- a/src/text-editor-registry.js +++ b/src/text-editor-registry.js @@ -18,6 +18,7 @@ const EDITOR_PARAMS_BY_SETTING_KEY = [ ['editor.softWrapHangingIndent', 'softWrapHangingIndentLength'], ['editor.softWrapAtPreferredLineLength', 'softWrapAtPreferredLineLength'], ['editor.preferredLineLength', 'preferredLineLength'], + ['editor.maxScreenLineLength', 'maxScreenLineLength'], ['editor.autoIndent', 'autoIndent'], ['editor.autoIndentOnPaste', 'autoIndentOnPaste'], ['editor.scrollPastEnd', 'scrollPastEnd'],