tweak mousehandler
This commit is contained in:
parent
a831eef3e8
commit
9f57a4f99d
2 changed files with 8 additions and 4 deletions
|
|
@ -52,10 +52,14 @@ function GutterHandler(mouseHandler) {
|
||||||
var row = e.getDocumentPosition().row;
|
var row = e.getDocumentPosition().row;
|
||||||
var selection = editor.session.selection;
|
var selection = editor.session.selection;
|
||||||
|
|
||||||
selection.moveCursorTo(row, 0);
|
if (e.getShiftKey()) {
|
||||||
selection.selectLine();
|
selection.selectTo(row, 0);
|
||||||
|
} else {
|
||||||
|
selection.moveCursorTo(row, 0);
|
||||||
|
selection.selectLine();
|
||||||
|
mouseHandler.$clickSelection = selection.getRange();
|
||||||
|
}
|
||||||
|
|
||||||
mouseHandler.$clickSelection = selection.getRange();
|
|
||||||
mouseHandler.captureMouse(e, "selectByLines");
|
mouseHandler.captureMouse(e, "selectByLines");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@ function DefaultHandlers(mouseHandler) {
|
||||||
|
|
||||||
editor.selectAll();
|
editor.selectAll();
|
||||||
this.$clickSelection = editor.getSelectionRange();
|
this.$clickSelection = editor.getSelectionRange();
|
||||||
this.setState("select");
|
this.setState("null");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.onScroll = function(ev) {
|
this.onScroll = function(ev) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue