diff options
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c index 352818c..e287b4d 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1112,6 +1112,7 @@ cmd_time (int interactive, void *data) char * cmd_number (int interactive, void *data) { + rp_window_frame *frame; int old_number, new_number; rp_window *other_win, *win; char *str; @@ -1180,7 +1181,14 @@ cmd_number (int interactive, void *data) old_number = win->number; other_win->number = old_number; - /* Resort the the window in the list */ + /* Update the frame containing the window. */ + if (other_win->frame_number != EMPTY) + { + frame = screen_get_frame (other_win->scr, other_win->frame_number); + frame->win_number = old_number; + } + + /* Resort the window in the list */ list_del (&other_win->node); insert_into_list (other_win, &rp_mapped_window); } @@ -1192,6 +1200,13 @@ cmd_number (int interactive, void *data) win->number = new_number; numset_add_num (rp_window_numset, new_number); + /* Update the frame containing the window. */ + if (win->frame_number != EMPTY) + { + frame = screen_get_frame (win->scr, win->frame_number); + frame->win_number = new_number; + } + /* resort the the window in the list */ list_del (&win->node); insert_into_list (win, &rp_mapped_window); |