ctrl+dblClick must remove fold and it's subfolds
This commit is contained in:
parent
2424261f7a
commit
aa9ff0d763
2 changed files with 8 additions and 1 deletions
|
|
@ -259,7 +259,10 @@ function DefaultHandlers(editor) {
|
|||
// If the user dclicked on a fold, then expand it.
|
||||
var fold = editor.session.getFoldAt(pos.row, pos.column, 1);
|
||||
if (fold) {
|
||||
editor.session.expandFold(fold);
|
||||
if (ev.getAccelKey())
|
||||
editor.session.removeFold(fold);
|
||||
else
|
||||
editor.session.expandFold(fold);
|
||||
}
|
||||
else {
|
||||
editor.moveCursorToPosition(pos);
|
||||
|
|
|
|||
|
|
@ -128,6 +128,10 @@ var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
|
|||
return this.domEvent.shiftKey;
|
||||
};
|
||||
|
||||
this.getAccelKey = function() {
|
||||
return this.domEvent.ctrlKey || this.domEvent.metaKey ;
|
||||
};
|
||||
|
||||
}).call(MouseEvent.prototype);
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue