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,6 +259,9 @@ function DefaultHandlers(editor) {
|
||||||
// If the user dclicked on a fold, then expand it.
|
// If the user dclicked on a fold, then expand it.
|
||||||
var fold = editor.session.getFoldAt(pos.row, pos.column, 1);
|
var fold = editor.session.getFoldAt(pos.row, pos.column, 1);
|
||||||
if (fold) {
|
if (fold) {
|
||||||
|
if (ev.getAccelKey())
|
||||||
|
editor.session.removeFold(fold);
|
||||||
|
else
|
||||||
editor.session.expandFold(fold);
|
editor.session.expandFold(fold);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,10 @@ var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
|
||||||
return this.domEvent.shiftKey;
|
return this.domEvent.shiftKey;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.getAccelKey = function() {
|
||||||
|
return this.domEvent.ctrlKey || this.domEvent.metaKey ;
|
||||||
|
};
|
||||||
|
|
||||||
}).call(MouseEvent.prototype);
|
}).call(MouseEvent.prototype);
|
||||||
|
|
||||||
});
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue