Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Add new pref: lineWiseCopyCut #11706

Merged
merged 1 commit into from
Jul 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ define(function (require, exports, module) {
CLOSE_TAGS = "closeTags",
DRAG_DROP = "dragDropText",
HIGHLIGHT_MATCHES = "highlightMatches",
LINEWISE_COPY_CUT = "lineWiseCopyCut",
SCROLL_PAST_END = "scrollPastEnd",
SHOW_CURSOR_SELECT = "showCursorWhenSelecting",
SHOW_LINE_NUMBERS = "showLineNumbers",
Expand Down Expand Up @@ -120,6 +121,7 @@ define(function (require, exports, module) {
cmOptions[CLOSE_TAGS] = "autoCloseTags";
cmOptions[DRAG_DROP] = "dragDrop";
cmOptions[HIGHLIGHT_MATCHES] = "highlightSelectionMatches";
cmOptions[LINEWISE_COPY_CUT] = "lineWiseCopyCut";
cmOptions[SCROLL_PAST_END] = "scrollPastEnd";
cmOptions[SHOW_CURSOR_SELECT] = "showCursorWhenSelecting";
cmOptions[SHOW_LINE_NUMBERS] = "lineNumbers";
Expand Down Expand Up @@ -174,6 +176,9 @@ define(function (require, exports, module) {
}
}
});
PreferencesManager.definePreference(LINEWISE_COPY_CUT, "boolean", true, {
description: Strings.DESCRIPTION_LINEWISE_COPY_CUT
});
PreferencesManager.definePreference(SCROLL_PAST_END, "boolean", false, {
description: Strings.DESCRIPTION_SCROLL_PAST_END
});
Expand Down Expand Up @@ -401,6 +406,7 @@ define(function (require, exports, module) {
indentWithTabs : currentOptions[USE_TAB_CHAR],
inputStyle : "textarea", // the "contenteditable" mode used on mobiles could cause issues
lineNumbers : currentOptions[SHOW_LINE_NUMBERS],
lineWiseCopyCut : currentOptions[LINEWISE_COPY_CUT],
lineWrapping : currentOptions[WORD_WRAP],
matchBrackets : { maxScanLineLength: 50000, maxScanLines: 1000 },
matchTags : { bothTags: true },
Expand Down
1 change: 1 addition & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,7 @@ define({
"DESCRIPTION_LANGUAGE" : "Language specific settings",
"DESCRIPTION_LANGUAGE_FILE_EXTENSIONS" : "Additional mappings from file extension to language name",
"DESCRIPTION_LANGUAGE_FILE_NAMES" : "Additional mappings from file name to language name",
"DESCRIPTION_LINEWISE_COPY_CUT" : "Doing copy and cut when there's no selection will copy or cut the whole lines that have cursors in them",
"DESCRIPTION_LINTING_ENABLED" : "true to enable Code Inspection",
"DESCRIPTION_ASYNC_TIMEOUT" : "The time in milliseconds after which asynchronous linters time out",
"DESCRIPTION_LINTING_PREFER" : "Array of linters to run first",
Expand Down