From 81a8bf8da8295611a734e82b5c0e6869bc6272b1 Mon Sep 17 00:00:00 2001 From: Fred-Barclay Date: Mon, 26 Feb 2018 21:33:18 -0600 Subject: [PATCH] Add 'clear' option to context menu - from @yubaoquan --- AUTHORS | 3 +++ CHANGELOG.md | 1 + lib/view.coffee | 4 ++++ menus/termination.cson | 2 ++ package.json | 47 ++---------------------------------------- 5 files changed, 12 insertions(+), 45 deletions(-) diff --git a/AUTHORS b/AUTHORS index 07acef4..e055e09 100644 --- a/AUTHORS +++ b/AUTHORS @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index ac5b1f7..9c47b75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/lib/view.coffee b/lib/view.coffee index a5b6a4b..dee7589 100644 --- a/lib/view.coffee +++ b/lib/view.coffee @@ -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] diff --git a/menus/termination.cson b/menus/termination.cson index 92d02c7..3a395db 100644 --- a/menus/termination.cson +++ b/menus/termination.cson @@ -22,6 +22,8 @@ {type: 'separator'}, {label: 'Hide', command: 'termination:hide'}, {label: 'Close', command: 'termination:close'} + {type: 'separator'} + {label: "Clear", command: 'termination:clear'} ] 'menu': [ { diff --git a/package.json b/package.json index 5f96a53..a2846b8 100644 --- a/package.json +++ b/package.json @@ -32,51 +32,8 @@ "url": "https://github.com/Fred-Barclay" }, { - "name": "Ben Pritchard", - "url": "https://github.com/benpritchard" - }, - { - "name": "Peter Benjamin", - "email": "petermbenjamin@gmail.com", - "url": "https://github.com/pmbenjamin" - }, - { - "name": "David Klanac", - "url": "https://github.com/dklanac" - }, - { - "name": "Ben Phelps", - "email": "ben@phelps.io", - "url": "https://github.com/benphelps" - }, - { - "name": "Yianni Kostantinidis", - "url": "http://yianni.codes/" - }, - { - "name": "Guten Ye", - "email": "guten@guten.me", - "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",