From a5bf0bc0be844f9b7851ab7c8d7782d786d98986 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 9 Mar 2011 09:36:50 +0100 Subject: [PATCH] make jshint happy --- lib/ace/editor.js | 4 ++-- lib/ace/mouse_handler.js | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/ace/editor.js b/lib/ace/editor.js index b204a8f8..7d87a98b 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -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(); diff --git a/lib/ace/mouse_handler.js b/lib/ace/mouse_handler.js index 112816a0..1805e247 100644 --- a/lib/ace/mouse_handler.js +++ b/lib/ace/mouse_handler.js @@ -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