samuelivarsson / atom-iv-terminal

Simple terminal for the Atom text editor.
https://atom.io/packages/iv-terminal
MIT License
11 stars 2 forks source link

Uncaught TypeError: activeSession.pasteFromClipboard is not a function #4

Open JakeIwen opened 4 years ago

JakeIwen commented 4 years ago

[Enter steps to reproduce:]

Edit - I determined this to be an issue with atom-ternjs, but would like to reference this. Feel free to close.

When attempting to copy or paste with atom-iv-terminal, this error is thrown. This issue for another atom terminal package connects the problem to atom-ternjs.

Here is the offending code in packages/atom-ternjs/lib/atom-ternjs-helper.js, with a patch that remedies the issu.

export function focusEditor() {

  // const editor = atom.workspace.getActiveTextEditor();
  const editor = atom.workspace.getActivePaneItem();

  // if (!editor) {
  if (!isValidEditor(editor)) {

    return;

  }

  const view = atom.views.getView(editor);

  view && view.focus && view.focus();
}

Atom: 1.48.0 x64 Electron: 5.0.13 OS: Mac OS X 10.15.1 Thrown From: iv-terminal package 1.3.0

Stack Trace

Uncaught TypeError: activeSession.pasteFromClipboard is not a function

At /Users/jacobr/.atom/packages/iv-terminal/lib/main.js:96

TypeError: activeSession.pasteFromClipboard is not a function
    at Object.handlePaste (/packages/iv-terminal/lib/main.js:96:19)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:349786)
    at KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1242246)
    at KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1238380)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:284835)

Commands

  3x -0:45.1.0 core:move-right (input.hidden-input)
     -0:44.1.0 core:move-left (input.hidden-input)
     -0:43.7.0 editor:select-to-first-character-of-line (input.hidden-input)
     -0:43.1.0 core:copy (input.hidden-input)
     -0:42.9.0 core:move-right (input.hidden-input)
  2x -0:40.3.0 core:backspace (input.hidden-input)
     -0:37.5.0 core:paste (input.hidden-input)
  8x -0:36.3.0 core:backspace (input.hidden-input)
 17x -0:28.1.0 core:move-left (input.hidden-input)
  8x -0:27.1.0 core:move-right (input.hidden-input)
 21x -0:26.6.0 core:move-left (input.hidden-input)
     -0:23.2.0 editor:move-to-end-of-screen-line (input.hidden-input)
 34x -0:23 core:move-left (input.hidden-input)
     -0:20.3.0 core:move-right (input.hidden-input)
     -0:19 core:paste (input.hidden-input)
     -0:07.6.0 iv-terminal:paste (textarea.xterm-helper-textarea)

Non-Core Packages

angular-2-typeScript-snippets 0.7.0 
angularjs 0.5.3 
atom-angular-material-snippets 1.3.0 
atom-bootstrap3 1.2.12 
atom-import-sort 6.0.0 
atom-less 0.1.10 
atom-material-syntax-dark 1.0.0 
atom-material-ui 2.1.3 
atom-terminal-panel 4.4.4 
atom-ternjs 0.20.0 
atom-typescript 13.5.1 
autoclose-html 0.23.0 
autocomplete-angular-material 0.4.0 
autocomplete-python 1.16.0 
autocorrect 0.1.0 
autocorrect-en 0.0.3 
busy-signal 2.0.1 
case-keep-replace 0.6.2 
character-count 1.0.3 
codepen-syntax 0.1.1 
color-picker 2.3.0 
drag-relative-path 1.2.3 
file-icons 2.1.36 
fold-comments 0.6.0 
fonts 3.9.0 
gaia-dark-syntax 2.1.0 
git-status 0.3.4 
git-time-machine 2.1.0 
gloom 0.6.5 
goto-definition 1.3.4 
grunt-runner 0.14.0 
highlight-selected 0.16.0 
hyperclick 0.1.5 
intentions 1.1.5 
iv-terminal 1.3.0 
jsx-comment 0.2.0 
keybinding-cheatsheet 0.1.1 
language-babel 2.85.0 
language-crontab 1.0.0 
language-ejs 0.4.0 
language-graphql 1.0.0 
language-haml 0.32.1 
language-haskell 1.19.1 
language-ini 1.23.0 
language-kotlin 0.5.0 
language-lua 0.9.11 
language-mjml 2.0.1 
language-ocaml 1.9.5 
language-rust 0.4.12 
language-scala 1.1.10 
language-thrift 1.0.2 
language-unix-shell 0.40.1 
linter 2.3.1 
linter-coffeescript 1.0.0 
linter-csslint 2.0.6 
linter-eslint 8.5.5 
linter-ruby 1.3.1 
linter-sass-lint 1.9.0 
linter-scss-lint 3.2.1 
linter-ui-default 1.8.0 
linter-xo 0.29.0 
livereload 0.4.4 
minimap 4.29.9 
minimap-highlight-selected 4.6.1 
monokai-seti 0.9.0 
multi-cursor 3.0.0 
no-caffeine-syntax 0.21.0 
nuclide-format-js 0.0.47 
open-in-browsers 0.0.30 
open-recent 5.0.0 
pathr 1.0.2 
pigments 0.40.2 
platformio-ide-terminal 2.9.4 
prettier-atom 0.58.0 
react 0.18.0 
react-es6-snippets 0.3.0 
react-snippets 1.2.0 
regex-railroad-diagram 0.19.4 
regex-tester 0.2.0 
remote-atom 1.3.12 
remove-whitespace 0.2.1 
rename-tabs 0.2.0 
ruby-block 0.3.6 
set-syntax 0.4.0 
seti-ui 1.11.0 
smart-tab-names 0.3.0 
sort-lines 0.19.0 
spacegray-atom-dark-syntax 1.3.2 
spaces-in-braces 0.1.0 
split-diff 1.6.1 
Sublime-Style-Column-Selection 1.7.5 
sync-settings 4.3.3 
text-manipulation 0.6.0 
toggle-gutter 0.3.4 
toggle-quotes 1.1.4 
tomorrow-night-eighties-syntax 1.1.0 
tool-bar 1.2.0 
twilight 0.3.0 
webbox-color 0.5.9 
whitespacer 1.1.1 
xatom-debug-chrome 0.7.4 
xatom-debug-nodejs 0.9.3 
nelson6e65 commented 3 years ago

I have similar issue, but for copy: #8