hyper/lib/utils/selection.js

11 lines
380 B
JavaScript
Raw Normal View History

2016-08-17 17:45:18 -08:00
// clear selection range of current selected term view
// Fix event when terminal text is selected and keyboard action is invoked
exports.clear = function (terminal) {
terminal.document_.getSelection().removeAllRanges();
};
// Use selection expand upon dblclick
exports.expand = function (terminal) {
terminal.screen_.expandSelection(terminal.document_.getSelection());
};