Support positioning a popup at the caret.

Fix #30.