marijnh/CodeMirror — pull request #1189 by onecrayon (2013-01-25 21:23:51+00:00)
Title: Slight improvement to addWidget positioning behavior

This pull makes the following changes to the addWidget function:

* "over" vertical positioning logic is removed since it's redundant (top is already set to pos.top by default, so no reason to assign it twice)
* new "above" vertical positioning logic, which will default to sticking the widget above the position (if space is available), and otherwise will stick it below (basically a variant of "near")
* "near" vertical positioning logic is revised to default to sticking the widget beneath the position, but if it will not fit it will stick it above
* If the widget will not fit either above or below the position, then it will should default to overlaying the position (same behavior as previously)