t9md / atom-quick-highlight

Highlight text quickly
https://atom.io/packages/quick-highlight
MIT License
32 stars 7 forks source link

Uncaught TypeError: Invalid Point: (NaN, 0) #2

Closed t9md closed 8 years ago

t9md commented 8 years ago

cc: @as-cii

After upgrading Atom v1.1.0. editorElement.getVisibleRowRange() return [undefined, undefined] when editor is not shown before.
May be its related to introduction of editorElement.component.presenter.pendingScrollTop?
I believe https://github.com/atom/vim-mode/pull/906 is caused by same reason(scrollTop is not immediately refreshed).
I believe this should be fixed in Atom core side.

To avoid this problem, I can't use editorElement.getVisibleRowRange() on atom.workspace.onDidChangeActivePaneItem event.

Need investigation to provide immediate fix.