tweak mousehandler

This commit is contained in:
nightwing 2012-05-03 17:35:59 +04:00
commit 9f57a4f99d
2 changed files with 8 additions and 4 deletions

View file

@ -52,10 +52,14 @@ function GutterHandler(mouseHandler) {
var row = e.getDocumentPosition().row;
var selection = editor.session.selection;
selection.moveCursorTo(row, 0);
selection.selectLine();
if (e.getShiftKey()) {
selection.selectTo(row, 0);
} else {
selection.moveCursorTo(row, 0);
selection.selectLine();
mouseHandler.$clickSelection = selection.getRange();
}
mouseHandler.$clickSelection = selection.getRange();
mouseHandler.captureMouse(e, "selectByLines");
});
}

View file

@ -297,7 +297,7 @@ function DefaultHandlers(mouseHandler) {
editor.selectAll();
this.$clickSelection = editor.getSelectionRange();
this.setState("select");
this.setState("null");
};
this.onScroll = function(ev) {