Fixes highlighting when view is shifted. (examine, open, close)

Fixes #7697.