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

Commit

Permalink
Only change cursor on Windows, remove unneeded CM option
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Gerber committed Dec 22, 2014
1 parent ad97d5f commit 49b1181
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define, $, window, brackets */
/*global define, $, window */

/**
* Editor is a 1-to-1 wrapper for a CodeMirror editor instance. It layers on Brackets-specific
Expand Down Expand Up @@ -311,7 +311,6 @@ define(function (require, exports, module) {
coverGutterNextToScrollbar : true,
cursorScrollMargin : 3,
dragDrop : currentOptions[DRAG_DROP],
styleSelectedText : currentOptions[DRAG_DROP] && brackets.platform === "win",
electricChars : false, // we use our own impl of this to avoid CodeMirror bugs; see _checkElectricChars()
extraKeys : codeMirrorKeyMap,
highlightSelectionMatches : currentOptions[HIGHLIGHT_MATCHES],
Expand Down Expand Up @@ -2219,9 +2218,6 @@ define(function (require, exports, module) {
Editor._toggleLinePadding(!newValue);
this._codeMirror.setOption(cmOptions[SHOW_LINE_NUMBERS], newValue);
this.refreshAll();
} else if (prefName === DRAG_DROP) {
this._codeMirror.setOption(cmOptions[DRAG_DROP], newValue);
this._codeMirror.setOption("styleSelectedText", cmOptions[DRAG_DROP] && brackets.platform === "win");
} else {
this._codeMirror.setOption(cmOptions[prefName], newValue);
}
Expand Down
10 changes: 5 additions & 5 deletions src/styles/brackets_codemirror_override.less
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@

.platform-win .CodeMirror {
.code-font-win();

div.CodeMirror-selected {
pointer-events: auto;
cursor: default;
}
}

.CodeMirror-activeline-background {
Expand Down Expand Up @@ -268,11 +273,6 @@ div.CodeMirror-cursors {
}

.CodeMirror-matchingtag { background: @matching-bracket; }

div.CodeMirror-selected {
pointer-events: auto;
cursor: default;
}
}

/*
Expand Down

0 comments on commit 49b1181

Please sign in to comment.