adobe/CodeMirror2 — pull request #86 by njx (2013-02-12 01:33:42+00:00)
Title: Avoid scrolling to cursor position in a non-visible editor

@gruehle

This is a proposed interim fix for adobe/brackets#2782.

The issue is that if an editor is hidden and an edit is made in that editor that causes a selection change, CodeMirror will attempt to scroll the selection into view. But the calculation of the new scroll position depends on the editor's scroller's `clientHeight`, which is 0 while it's hidden, so the scroll position becomes bogus, and causes problems on later refreshes.

The interim fix is to simply avoid trying to scroll in this case. Longer-term, we probably want a fix that will make it so the scroll happens once the view is visible again, but we don't need that for Brackets right now. I'll file a bug against upstream CodeMirror to make the more general fix.

Since this is intended to just be an interim patch, this pull request is into the brackets-sprint20 branch. We need to update the brackets CM SHA accordingly.