Skip to content

Commit

Permalink
Add 'clear' option to context menu - from @yubaoquan
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred-Barclay committed Feb 27, 2018
1 parent a7c79a3 commit 81a8bf8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 45 deletions.
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ Ivan Kravets (https://github.com/ivankravets)

Andy Bayer (https://github.com/anderoonies)
* Fixed deprecation of Object.basename

Jerry Yu (https://github.com/yubaoquan)
* Add 'clear' option to context (right-click) menu
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Merged gruvbox theme (from @mike3run)
* Fixed corruption when terminal is maximised (from @takumiabe)
* Fixed "Arguments to path.basename must be strings" #158 on PIO upstream (from @anderoonies)
* Added 'clear' option to context (right-click) menu (from @yubaoquan)

## 0.6.0
* Added note that theme change requires terminal restart.
Expand Down
4 changes: 4 additions & 0 deletions lib/view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ class TerminationView extends View
paste: ->
@input atom.clipboard.read()

clear: ->
@terminal.destroy()
@displayTerminal()

copyAllToNewFile: ->
text = @terminal.lines.map (line) ->
line.map (cols) -> cols[1]
Expand Down
2 changes: 2 additions & 0 deletions menus/termination.cson
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
{type: 'separator'},
{label: 'Hide', command: 'termination:hide'},
{label: 'Close', command: 'termination:close'}
{type: 'separator'}
{label: "Clear", command: 'termination:clear'}
]
'menu': [
{
Expand Down
47 changes: 2 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,51 +32,8 @@
"url": "https://github.com/Fred-Barclay"
},
{
"name": "Ben Pritchard",
"url": "https://github.com/benpritchard"
},
{
"name": "Peter Benjamin",
"email": "[email protected]",
"url": "https://github.com/pmbenjamin"
},
{
"name": "David Klanac",
"url": "https://github.com/dklanac"
},
{
"name": "Ben Phelps",
"email": "[email protected]",
"url": "https://github.com/benphelps"
},
{
"name": "Yianni Kostantinidis",
"url": "http://yianni.codes/"
},
{
"name": "Guten Ye",
"email": "[email protected]",
"url": "http://guten.me/"
},
{
"name": "Hani Sharabash",
"url": "https://github.com/hanibash"
},
{
"name": "Pietro De Nicolao",
"url": "https://pietrodn.wordpress.org/"
},
{
"name": "Miguel Palau",
"url": "https://github.com/mike3run"
},
{
"name": "Takumi Abe",
"url": "https://github.com/takumiabe"
},
{
"name": "Andy Bayer",
"url": "https://github.com/anderoonies"
"name": "Our *awesome* community!",
"url": "https://github.com/Fred-Barclay/Termination/blob/master/AUTHORS"
}
],
"homepage": "https://atom.io/packages/termination",
Expand Down

0 comments on commit 81a8bf8

Please sign in to comment.