Make sure gutter is redrawn when a document is shifted

Issue #2498