Skip to content

Commit

Permalink
Add prependListener and prependOnceListener functions
Browse files Browse the repository at this point in the history
These are expected on some systems. Unclear why.

Fixes #481
  • Loading branch information
noseglid committed Nov 7, 2016
1 parent ea9067c commit dbc8b84
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/build-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ export default class BuildView extends View {
scrollback: atom.config.get('build.terminalScrollback')
});

// On some systems, prependListern and prependOnceListener is expected to exist. Add them until terminal replacement is here.
this.terminal.prependListener = (...a) => {
this.terminal.addListener(...a);
};
this.terminal.prependOnceListener = (...a) => {
this.terminal.addOnceListener(...a);
};

this.terminal.getContent = function () {
return this.lines.reduce((m1, line) => {
return m1 + line.reduce((m2, col) => m2 + col[1], '') + '\n';
Expand Down

0 comments on commit dbc8b84

Please sign in to comment.