move window and buffer