xatom-debug
xatom-debug copied to clipboard
Workaround for deprecated getScrollTop call. Fixes issue 36.
This fixes issue 36.
I was added a workaround by adding a check to see if the function getScrollTop is defined, falling back on the old api if not. Not sure why the 'editor' passed into getEditorPositionFromEvent sometimes uses the old api, and sometimes uses the new one. This workaround accommodates both cases.
Thanks to this comment on issue 170 at ionide
You have to use editor.getScrollTop() instead of editor.displayBuffer.getScrollTop() in the definiton of bufferPositionFromMouseEvent, because getScrollTop has moved from DisplayBuffer to TextEditorElement since atom/atom@535a9da.