add sanity check for empty buffers
fix color bug

Fixes a bug that happened, when an active buffer was closed and
reopened. Calls s:set_colors() in this case.