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() {
|
||||
return this.keyBinding.getKeyboardHandler();
|
||||
}
|
||||
};
|
||||
|
||||
this.setSession = function(session) {
|
||||
if (this.session == session) return;
|
||||
|
|
@ -910,7 +910,7 @@ var Editor =function(renderer, session) {
|
|||
|
||||
this.getCursorPositionScreen = function() {
|
||||
return this.session.documentToScreenPosition(this.getCursorPosition());
|
||||
}
|
||||
};
|
||||
|
||||
this.getSelectionRange = function() {
|
||||
return this.selection.getRange();
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ var MouseHandler = function(editor) {
|
|||
var state = STATE_UNKNOWN;
|
||||
var inSelection = false;
|
||||
|
||||
var button = event.getButton(e)
|
||||
if (button != 0) {
|
||||
var button = event.getButton(e);
|
||||
if (button !== 0) {
|
||||
if (selectionEmpty) {
|
||||
editor.moveCursorToPosition(pos);
|
||||
}
|
||||
|
|
@ -111,10 +111,11 @@ var MouseHandler = function(editor) {
|
|||
event.capture(editor.container, function(){}, editor.textInput.onContextMenuClose);
|
||||
}
|
||||
return;
|
||||
} else
|
||||
inSelection = !editor.getReadOnly() &&
|
||||
!selectionEmpty &&
|
||||
selectionRange.contains(pos.row, pos.column);
|
||||
} else {
|
||||
inSelection = !editor.getReadOnly()
|
||||
&& !selectionEmpty
|
||||
&& selectionRange.contains(pos.row, pos.column);
|
||||
}
|
||||
|
||||
if (!inSelection) {
|
||||
// Directly pick STATE_SELECT, since the user is not clicking inside
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue