Always check/restore focus around call to `patchDisplay()`

Prevents focus loss in line widgets when they're updated.
Scroll cursor into view after un/redo

Closes #2278
Fix bug in estimateCoords