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

Commit

Permalink
Merge pull request #11706 from adobe/marcel/pref-linewise-copy
Browse files Browse the repository at this point in the history
Add new pref: lineWiseCopyCut
  • Loading branch information
Marcel Gerber committed Jul 24, 2016
2 parents 5145e53 + 0bc1d05 commit 78548a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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

0 comments on commit 78548a5

Please sign in to comment.