Add check to prevent errors when using vimpager.

This fixes an initial error message that must be bypassed when using vimpager. As far as I can tell this shouldn't affect anything outside this specific case.