Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'getCursorBufferPosition' of undefined #65

Open
daiyuanming opened this issue Mar 13, 2018 · 3 comments

Comments

@daiyuanming
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.24.1 x64
Electron: 1.6.16
OS: Mac OS X 10.13.3
Thrown From: document-outline package 2.1.1

Stack Trace

Uncaught TypeError: Cannot read property 'getCursorBufferPosition' of undefined

At /Users/daiyuanming/.atom/packages/document-outline/lib/outline-tree.js:97

TypeError: Cannot read property 'getCursorBufferPosition' of undefined
    at OutlineTreeView.didClick (/packages/document-outline/lib/outline-tree.js:97:29)

Commands

  2x -7:26 core:backspace (input.hidden-input)
     -6:51 core:move-down (input.hidden-input)
     -6:50.7.0 markdown-writer:insert-new-line (input.hidden-input)
     -6:50.7.0 autocomplete-plus:confirm (input.hidden-input)
  8x -6:48.7.0 core:backspace (input.hidden-input)
  2x -6:37.8.0 core:move-right (input.hidden-input)
  3x -6:36.1.0 core:backspace (input.hidden-input)
     -6:33.1.0 core:save (input.hidden-input)
     -6:18.4.0 core:backspace (input.hidden-input)
     -6:17.7.0 markdown-writer:indent-list-line (input.hidden-input)
  2x -6:15.2.0 core:backspace (input.hidden-input)
     -6:14.5.0 markdown-writer:indent-list-line (input.hidden-input)
  4x -6:03.5.0 core:backspace (input.hidden-input)
     -5:33.9.0 core:move-right (input.hidden-input)
  3x -5:33.1.0 core:backspace (input.hidden-input)
     -4:53.8.0 core:save (input.hidden-input)

Non-Core Packages

document-outline 2.1.1 
markdown-image-helper 1.0.4 
markdown-pdf 2.1.0 
markdown-preview-plus 2.5.5 
markdown-scroll-sync 2.1.2 
markdown-writer 2.7.3 
simplified-chinese-menu 5.3.5 
@salim-b
Copy link
Contributor

salim-b commented May 11, 2018

I always run into this issue when I click on a header in the document-outline sidebar while the Markdown preview from markdown-preview-plus is the active window pane.

Ideally document-outline would be made fully compatible with markdown-preview-plus, i.e. both the actual Markdown document as well as any an opened preview window pane would scroll to the respective section of the document when a header is clicked in the document-outline sidebar, too. That would be awesome! Note that it doesn't have to be synchronized, i.e. it's not necessary that both the actual Markdown and the preview are scrolled together, because markdown-preview-plus already offers that synchronization!

As a presumably easier-to-implement workaround a message could be shown about having the "wrong" window pane active (preview instead of actual document).

@uliska
Copy link

uliska commented Jul 10, 2019

The same is true if the active pane shows a PDF preview created with the atom-latex package (which might be the same used by the markdown previewer).

@uliska
Copy link

uliska commented Jul 10, 2019

I've looked a bit closer right now, and the issue seems not actually the clicking on a link in the outline. Rather, the outline pane doesn't detect that it should be closed when the active tab changes to a PDF preview - or e.g. the Settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants