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

Commit 0bc1d05

Browse files
author
Marcel Gerber
committed
Add new pref: lineWiseCopyCut
1 parent 5145e53 commit 0bc1d05

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/editor/Editor.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ define(function (require, exports, module) {
8888
CLOSE_TAGS = "closeTags",
8989
DRAG_DROP = "dragDropText",
9090
HIGHLIGHT_MATCHES = "highlightMatches",
91+
LINEWISE_COPY_CUT = "lineWiseCopyCut",
9192
SCROLL_PAST_END = "scrollPastEnd",
9293
SHOW_CURSOR_SELECT = "showCursorWhenSelecting",
9394
SHOW_LINE_NUMBERS = "showLineNumbers",
@@ -120,6 +121,7 @@ define(function (require, exports, module) {
120121
cmOptions[CLOSE_TAGS] = "autoCloseTags";
121122
cmOptions[DRAG_DROP] = "dragDrop";
122123
cmOptions[HIGHLIGHT_MATCHES] = "highlightSelectionMatches";
124+
cmOptions[LINEWISE_COPY_CUT] = "lineWiseCopyCut";
123125
cmOptions[SCROLL_PAST_END] = "scrollPastEnd";
124126
cmOptions[SHOW_CURSOR_SELECT] = "showCursorWhenSelecting";
125127
cmOptions[SHOW_LINE_NUMBERS] = "lineNumbers";
@@ -174,6 +176,9 @@ define(function (require, exports, module) {
174176
}
175177
}
176178
});
179+
PreferencesManager.definePreference(LINEWISE_COPY_CUT, "boolean", true, {
180+
description: Strings.DESCRIPTION_LINEWISE_COPY_CUT
181+
});
177182
PreferencesManager.definePreference(SCROLL_PAST_END, "boolean", false, {
178183
description: Strings.DESCRIPTION_SCROLL_PAST_END
179184
});
@@ -401,6 +406,7 @@ define(function (require, exports, module) {
401406
indentWithTabs : currentOptions[USE_TAB_CHAR],
402407
inputStyle : "textarea", // the "contenteditable" mode used on mobiles could cause issues
403408
lineNumbers : currentOptions[SHOW_LINE_NUMBERS],
409+
lineWiseCopyCut : currentOptions[LINEWISE_COPY_CUT],
404410
lineWrapping : currentOptions[WORD_WRAP],
405411
matchBrackets : { maxScanLineLength: 50000, maxScanLines: 1000 },
406412
matchTags : { bothTags: true },

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ define({
744744
"DESCRIPTION_LANGUAGE" : "Language specific settings",
745745
"DESCRIPTION_LANGUAGE_FILE_EXTENSIONS" : "Additional mappings from file extension to language name",
746746
"DESCRIPTION_LANGUAGE_FILE_NAMES" : "Additional mappings from file name to language name",
747+
"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",
747748
"DESCRIPTION_LINTING_ENABLED" : "true to enable Code Inspection",
748749
"DESCRIPTION_ASYNC_TIMEOUT" : "The time in milliseconds after which asynchronous linters time out",
749750
"DESCRIPTION_LINTING_PREFER" : "Array of linters to run first",

0 commit comments

Comments
 (0)