make jshint happy
This commit is contained in:
parent
b2193f714b
commit
a5bf0bc0be
2 changed files with 9 additions and 8 deletions
|
|
@ -113,7 +113,7 @@ var Editor =function(renderer, session) {
|
||||||
|
|
||||||
this.getKeyboardHandler = function() {
|
this.getKeyboardHandler = function() {
|
||||||
return this.keyBinding.getKeyboardHandler();
|
return this.keyBinding.getKeyboardHandler();
|
||||||
}
|
};
|
||||||
|
|
||||||
this.setSession = function(session) {
|
this.setSession = function(session) {
|
||||||
if (this.session == session) return;
|
if (this.session == session) return;
|
||||||
|
|
@ -910,7 +910,7 @@ var Editor =function(renderer, session) {
|
||||||
|
|
||||||
this.getCursorPositionScreen = function() {
|
this.getCursorPositionScreen = function() {
|
||||||
return this.session.documentToScreenPosition(this.getCursorPosition());
|
return this.session.documentToScreenPosition(this.getCursorPosition());
|
||||||
}
|
};
|
||||||
|
|
||||||
this.getSelectionRange = function() {
|
this.getSelectionRange = function() {
|
||||||
return this.selection.getRange();
|
return this.selection.getRange();
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,8 @@ var MouseHandler = function(editor) {
|
||||||
var state = STATE_UNKNOWN;
|
var state = STATE_UNKNOWN;
|
||||||
var inSelection = false;
|
var inSelection = false;
|
||||||
|
|
||||||
var button = event.getButton(e)
|
var button = event.getButton(e);
|
||||||
if (button != 0) {
|
if (button !== 0) {
|
||||||
if (selectionEmpty) {
|
if (selectionEmpty) {
|
||||||
editor.moveCursorToPosition(pos);
|
editor.moveCursorToPosition(pos);
|
||||||
}
|
}
|
||||||
|
|
@ -111,10 +111,11 @@ var MouseHandler = function(editor) {
|
||||||
event.capture(editor.container, function(){}, editor.textInput.onContextMenuClose);
|
event.capture(editor.container, function(){}, editor.textInput.onContextMenuClose);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else
|
} else {
|
||||||
inSelection = !editor.getReadOnly() &&
|
inSelection = !editor.getReadOnly()
|
||||||
!selectionEmpty &&
|
&& !selectionEmpty
|
||||||
selectionRange.contains(pos.row, pos.column);
|
&& selectionRange.contains(pos.row, pos.column);
|
||||||
|
}
|
||||||
|
|
||||||
if (!inSelection) {
|
if (!inSelection) {
|
||||||
// Directly pick STATE_SELECT, since the user is not clicking inside
|
// Directly pick STATE_SELECT, since the user is not clicking inside
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue