adobe/CodeMirror2 — pull request #74 by peterflynn (2012-08-23 09:01:52+00:00)
Title: Fix bugs with selection width

This fixes adobe/brackets#1267 and adobe/brackets#1283 by merging a single commit from upstream containing the fix (via `git cherry-pick`).

Both bugs were due to a single upstream regression, when the fixed width of the lineSpace was replaced with a widthForcer div (a ghost copy of the cursor positioned as if it were at the end of the longest line in the file -- to fix an [earlier bug from NJ](https://github.com/marijnh/CodeMirror/issues/550)). But the selection highlight is tied to the width of lineSpace (it uses left + right positioning). Without a fixed width, lineSpace was effectively 100% wide (instead of the width of the widest line, I think causing 1267). This also made its width (and hence the selection's) natively track to window resizes (hence the jiggling in 1283).

Marijn's fix: set a minWidth on lineSpace in place of the old fixed width, alongside new the widthForcer div to keep NJ's bug fixed.