updating window/pane index