Skip to content

Commit

Permalink
Pass WheelEvent from terminal panel to xterm
Browse files Browse the repository at this point in the history
This fixes the right-portion of the screen not scrolling (where the lines don't reach)

Fixes #6743
  • Loading branch information
Tyriar committed Jun 9, 2016
1 parent 2f0254d commit 7f404bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ export class TerminalInstance {
}
}

public dispatchEvent(event: Event) {
this.terminal.element.dispatchEvent(event);
}

public dispose(): void {
this.parentDomElement.removeChild(this.wrapperElement);
this.wrapperElement = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import lifecycle = require('vs/base/common/lifecycle');
import platform = require('vs/base/common/platform');
import DOM = require('vs/base/browser/dom');
import {TPromise} from 'vs/base/common/winjs.base';
import {Builder, Dimension} from 'vs/base/browser/builder';
import {IConfigurationService} from 'vs/platform/configuration/common/configuration';
Expand Down Expand Up @@ -47,6 +48,9 @@ export class TerminalPanel extends Panel {
this.themeStyleElement = document.createElement('style');
this.parentDomElement.appendChild(this.themeStyleElement);
this.configurationHelper = new TerminalConfigHelper(platform.platform, this.configurationService, this.parentDomElement);
this.toDispose.push(DOM.addDisposableListener(this.parentDomElement, 'wheel', (event: WheelEvent) => {
this.terminalInstance.dispatchEvent(new WheelEvent(event.type, event));
}));

return this.createTerminal();
}
Expand Down

0 comments on commit 7f404bf

Please sign in to comment.