Open iTsingchen opened 6 years ago
I have same problem
Steps to reproduce:
or more simple way:
Atom: 1.27.0-beta1 x64 Electron: 1.7.11 OS: Mac OS X 10.12.6 Thrown From: terminal-tab package 0.5.6
Uncaught TypeError: activeSession.copySelection is not a function
At /Users/jibon/.atom/packages/terminal-tab/lib/main.js:38
TypeError: activeSession.copySelection is not a function
at Object.handleCopy (/packages/terminal-tab/lib/main.js:38:19)
at CommandRegistry.handleCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app/src/command-registry.js:384:49)
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom Beta.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom Beta.app/Contents/Resources/app/src/window-event-handler.js:110:40)
-0:08.6.0 core:close (atom-pane.pane)
-0:02.0 terminal:copy (textarea.xterm-helper-textarea)
atom-beautify 0.32.2
atom-ide-ui 0.11.1
atom-ternjs 0.18.3
autocomplete-paths 2.12.2
busy-signal 1.4.3
docblockr 0.13.7
eslint-fixer 1.3.0
file-icons 2.1.19
firacode 0.3.0
flow-ide 1.11.0
git-blame 1.6.0
highlight-selected 0.13.1
hyperclick 0.0.0
importcost 0.0.3
intentions 1.1.5
language-dts 0.3.1
language-postcss 1.3.1
language-rust 0.4.12
linter 2.2.0
linter-eslint 8.4.1
linter-stylelint 4.1.0
linter-ui-default 1.7.1
markdown-preview-plus 2.5.8
markdown-writer 2.7.3
minimap 4.29.8
minimap-highlight-selected 4.6.1
minimap-linter 2.1.3
prettier-atom 0.51.0
pretty-json 2.0.0
remote-sync 4.1.8
svg-preview 0.12.1
sync-settings 0.8.6
teletype 0.13.1
terminal-tab 0.5.6
webbox-color 0.5.9
This bug make terminal unusable :(
I found a solution for this Go into packages> terminal-tab > view code
Open up lib > main.js
Modify line import { CompositeDisposable } from 'atom';
to import { CompositeDisposable, TextEditor } from 'atom';
And change the function below
handleCopy() {
const activeSession = atom.workspace.getActivePaneItem();
if(activeSession instanceof TextEditor){
activeSession.copySelectedText();
}else{
activeSession.copySelection();
}
},
handlePaste() {
const activeSession = atom.workspace.getActivePaneItem();
if(activeSession instanceof TextEditor){
activeSession.pasteText();
}else{
activeSession.pasteFromClipboard();
}
},
[Enter steps to reproduce:]
Atom: 1.24.0 x64 Electron: 1.6.16 OS: Mac OS X 10.13.3 Thrown From: terminal-tab package 0.5.4
Stack Trace
Uncaught TypeError: activeSession.pasteFromClipboard is not a function
Commands
Non-Core Packages