1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-26 20:16:07 +03:00

Merge branch 'master' of github.com:Eugeny/terminus

This commit is contained in:
Eugene Pankov 2018-12-05 01:31:03 +01:00
commit c1d1ddd3b7

View File

@ -261,15 +261,23 @@ export class TerminalTabComponent extends BaseTabComponent {
}
}
if (event.type === 'mousewheel') {
let wheelDeltaY = 0
if ('wheelDeltaY' in event) {
wheelDeltaY = (event as MouseWheelEvent)["wheelDeltaY"]
} else {
wheelDeltaY = (event as MouseWheelEvent)["deltaY"]
}
if (event.ctrlKey || event.metaKey) {
if ((event as MouseWheelEvent).wheelDeltaY > 0) {
if (wheelDeltaY > 0) {
this.zoomIn()
} else {
this.zoomOut()
}
} else if (event.altKey) {
event.preventDefault()
let delta = Math.round((event as MouseWheelEvent).wheelDeltaY / 50)
let delta = Math.round(wheelDeltaY / 50)
this.sendInput(((delta > 0) ? '\u001bOA' : '\u001bOB').repeat(Math.abs(delta)))
}
}