Skip to content

Commit 98db274

Browse files
authored
Merge pull request #2409 from Singond/master
2 parents d2d127c + e21cd59 commit 98db274

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

lib/script-view.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ export default class ScriptView extends MessagePanelView {
1818
this.scrollTimeout = null;
1919
this.ansiFilter = new AnsiFilter();
2020
this.headerView = headerView;
21+
// Use 'bottom' as the default position, because that was
22+
// the behaviour before the position became configurable:
23+
this.position = 'bottom';
24+
atom.config.observe('script.position', (newVal) => {
25+
this.position = newVal;
26+
});
2127

2228
this.showInTab = this.showInTab.bind(this);
2329
this.setHeaderAndShowExecutionTime = this.setHeaderAndShowExecutionTime.bind(this);

lib/script.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,19 @@ export const config = {
4949
'Directory of the script',
5050
],
5151
},
52+
position: {
53+
title: 'Panel position',
54+
description: 'Position of the panel with script output. \
55+
(Changes to this value will be applied upon reopening the panel.)',
56+
type: 'string',
57+
default: 'bottom',
58+
enum: [
59+
'top',
60+
'bottom',
61+
'left',
62+
'right',
63+
],
64+
},
5265
}
5366

5467
// For some reason, the text of these options does not show in package settings view

0 commit comments

Comments
 (0)