fixed github issue #464, switch tab-/sub-window mode with single document