Lines Matching refs:frp
26 static win_T *frame2win(frame_T *frp);
27 static int frame_has_win(frame_T *frp, win_T *wp);
29 static int frame_fixed_height(frame_T *frp);
30 static int frame_fixed_width(frame_T *frp);
31 static void frame_add_statusline(frame_T *frp);
33 static void frame_add_vsep(frame_T *frp);
48 static void frame_append(frame_T *after, frame_T *frp);
49 static void frame_insert(frame_T *before, frame_T *frp);
50 static void frame_remove(frame_T *frp);
53 static void frame_add_height(frame_T *frp, int n);
56 static void make_snapshot_rec(frame_T *fr, frame_T **frp);
857 frame_T *frp, *curfrp, *frp2, *prevfrp; in win_split_ins() local
913 for (frp = oldwin->w_frame->fr_parent; frp != NULL; in win_split_ins()
914 frp = frp->fr_parent) in win_split_ins()
916 if (frp->fr_layout == FR_ROW) in win_split_ins()
917 FOR_ALL_FRAMES(frp2, frp->fr_child) in win_split_ins()
920 prevfrp = frp; in win_split_ins()
958 frp = oldwin->w_frame->fr_parent->fr_child; in win_split_ins()
959 while (frp != NULL) in win_split_ins()
961 if (frp->fr_win != oldwin && frp->fr_win != NULL in win_split_ins()
962 && (frp->fr_win->w_width > new_size in win_split_ins()
963 || frp->fr_win->w_width > oldwin->w_width in win_split_ins()
969 frp = frp->fr_next; in win_split_ins()
996 for (frp = oldwin->w_frame->fr_parent; frp != NULL; in win_split_ins()
997 frp = frp->fr_parent) in win_split_ins()
999 if (frp->fr_layout == FR_COL) in win_split_ins()
1000 FOR_ALL_FRAMES(frp2, frp->fr_child) in win_split_ins()
1003 prevfrp = frp; in win_split_ins()
1058 frp = oldwin->w_frame->fr_parent->fr_child; in win_split_ins()
1059 while (frp != NULL) in win_split_ins()
1061 if (frp->fr_win != oldwin && frp->fr_win != NULL in win_split_ins()
1062 && (frp->fr_win->w_height > new_size in win_split_ins()
1063 || frp->fr_win->w_height > oldwin_height - new_size in win_split_ins()
1069 frp = frp->fr_next; in win_split_ins()
1145 frp = ALLOC_CLEAR_ONE(frame_T); in win_split_ins()
1146 *frp = *curfrp; in win_split_ins()
1148 frp->fr_parent = curfrp; in win_split_ins()
1149 frp->fr_next = NULL; in win_split_ins()
1150 frp->fr_prev = NULL; in win_split_ins()
1151 curfrp->fr_child = frp; in win_split_ins()
1153 curfrp = frp; in win_split_ins()
1154 if (frp->fr_win != NULL) in win_split_ins()
1155 oldwin->w_frame = frp; in win_split_ins()
1157 FOR_ALL_FRAMES(frp, frp->fr_child) in win_split_ins()
1158 frp->fr_parent = curfrp; in win_split_ins()
1162 frp = wp->w_frame; in win_split_ins()
1164 frp = new_wp->w_frame; in win_split_ins()
1165 frp->fr_parent = curfrp->fr_parent; in win_split_ins()
1169 frame_insert(curfrp, frp); in win_split_ins()
1171 frame_append(curfrp, frp); in win_split_ins()
1203 frp->fr_height = curfrp->fr_height; in win_split_ins()
1251 frp->fr_width = curfrp->fr_width; in win_split_ins()
1619 frame_T *frp; in win_exchange() local
1642 frp = curwin->w_frame->fr_parent->fr_child; in win_exchange()
1643 while (frp != NULL && --Prenum > 0) in win_exchange()
1644 frp = frp->fr_next; in win_exchange()
1647 frp = curwin->w_frame->fr_next; in win_exchange()
1649 frp = curwin->w_frame->fr_prev; in win_exchange()
1653 if (frp == NULL || frp->fr_win == NULL || frp->fr_win == curwin) in win_exchange()
1655 wp = frp->fr_win; in win_exchange()
1672 frame_insert(frp, curwin->w_frame); in win_exchange()
1711 frame_T *frp; in win_rotate() local
1725 FOR_ALL_FRAMES(frp, curwin->w_frame->fr_parent->fr_child) in win_rotate()
1726 if (frp->fr_win == NULL) in win_rotate()
1737 frp = curwin->w_frame->fr_parent->fr_child; in win_rotate()
1738 wp1 = frp->fr_win; in win_rotate()
1740 frame_remove(frp); in win_rotate()
1743 for ( ; frp->fr_next != NULL; frp = frp->fr_next) in win_rotate()
1745 win_append(frp->fr_win, wp1); in win_rotate()
1746 frame_append(frp, wp1->w_frame); in win_rotate()
1748 wp2 = frp->fr_win; // previously last window in win_rotate()
1753 for (frp = curwin->w_frame; frp->fr_next != NULL; in win_rotate()
1754 frp = frp->fr_next) in win_rotate()
1756 wp1 = frp->fr_win; in win_rotate()
1759 frame_remove(frp); in win_rotate()
1762 win_append(frp->fr_parent->fr_child->fr_win->w_prev, wp1); in win_rotate()
1763 frame_insert(frp->fr_parent->fr_child, frp); in win_rotate()
2820 frame_T *frp; in win_free_mem() local
2825 frp = win->w_frame; in win_free_mem()
2827 vim_free(frp); in win_free_mem()
2872 frame_T *frp, *frp2, *frp3; in winframe_remove() local
2898 frp = frp_close->fr_prev; in winframe_remove()
2900 while (frp != NULL || frp3 != NULL) in winframe_remove()
2902 if (frp != NULL) in winframe_remove()
2904 if (!frame_fixed_height(frp)) in winframe_remove()
2906 frp2 = frp; in winframe_remove()
2910 frp = frp->fr_prev; in winframe_remove()
2935 frp = frp_close->fr_prev; in winframe_remove()
2937 while (frp != NULL || frp3 != NULL) in winframe_remove()
2939 if (frp != NULL) in winframe_remove()
2941 if (!frame_fixed_width(frp)) in winframe_remove()
2943 frp2 = frp; in winframe_remove()
2947 frp = frp->fr_prev; in winframe_remove()
2982 FOR_ALL_FRAMES(frp, frp2->fr_child) in winframe_remove()
2983 frp->fr_parent = frp2->fr_parent; in winframe_remove()
2987 frp = frp2->fr_parent; in winframe_remove()
2989 topframe->fr_child = frp; in winframe_remove()
2992 frp2 = frp->fr_parent; in winframe_remove()
2993 if (frp2 != NULL && frp2->fr_layout == frp->fr_layout) in winframe_remove()
2997 if (frp2->fr_child == frp) in winframe_remove()
2998 frp2->fr_child = frp->fr_child; in winframe_remove()
2999 frp->fr_child->fr_prev = frp->fr_prev; in winframe_remove()
3000 if (frp->fr_prev != NULL) in winframe_remove()
3001 frp->fr_prev->fr_next = frp->fr_child; in winframe_remove()
3002 for (frp3 = frp->fr_child; ; frp3 = frp3->fr_next) in winframe_remove()
3007 frp3->fr_next = frp->fr_next; in winframe_remove()
3008 if (frp->fr_next != NULL) in winframe_remove()
3009 frp->fr_next->fr_prev = frp3; in winframe_remove()
3013 if (topframe->fr_child == frp) in winframe_remove()
3015 vim_free(frp); in winframe_remove()
3037 frame_T *frp; in win_altframe() local
3043 frp = win->w_frame; in win_altframe()
3045 if (frp->fr_prev == NULL) in win_altframe()
3046 return frp->fr_next; in win_altframe()
3047 if (frp->fr_next == NULL) in win_altframe()
3048 return frp->fr_prev; in win_altframe()
3052 target_fr = frp->fr_next; in win_altframe()
3053 other_fr = frp->fr_prev; in win_altframe()
3057 if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_COL && p_sb) in win_altframe()
3059 target_fr = frp->fr_prev; in win_altframe()
3060 other_fr = frp->fr_next; in win_altframe()
3065 if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_ROW && p_spr) in win_altframe()
3067 target_fr = frp->fr_prev; in win_altframe()
3068 other_fr = frp->fr_next; in win_altframe()
3073 if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_ROW) in win_altframe()
3109 frame2win(frame_T *frp) in frame2win() argument
3111 while (frp->fr_win == NULL) in frame2win()
3112 frp = frp->fr_child; in frame2win()
3113 return frp->fr_win; in frame2win()
3120 frame_has_win(frame_T *frp, win_T *wp) in frame_has_win() argument
3124 if (frp->fr_layout == FR_LEAF) in frame_has_win()
3125 return frp->fr_win == wp; in frame_has_win()
3127 FOR_ALL_FRAMES(p, frp->fr_child) in frame_has_win()
3145 frame_T *frp; in frame_new_height() local
3161 FOR_ALL_FRAMES(frp, topfrp->fr_child) in frame_new_height()
3163 frame_new_height(frp, height, topfirst, wfh); in frame_new_height()
3164 if (frp->fr_height > height) in frame_new_height()
3167 height = frp->fr_height; in frame_new_height()
3172 while (frp != NULL); in frame_new_height()
3179 frp = topfrp->fr_child; in frame_new_height()
3182 while (frame_fixed_height(frp)) in frame_new_height()
3184 frp = frp->fr_next; in frame_new_height()
3185 if (frp == NULL) in frame_new_height()
3191 while (frp->fr_next != NULL) in frame_new_height()
3192 frp = frp->fr_next; in frame_new_height()
3195 while (frame_fixed_height(frp)) in frame_new_height()
3196 frp = frp->fr_prev; in frame_new_height()
3203 while (frp != NULL) in frame_new_height()
3205 h = frame_minheight(frp, NULL); in frame_new_height()
3206 if (frp->fr_height + extra_lines < h) in frame_new_height()
3208 extra_lines += frp->fr_height - h; in frame_new_height()
3209 frame_new_height(frp, h, topfirst, wfh); in frame_new_height()
3213 frame_new_height(frp, frp->fr_height + extra_lines, in frame_new_height()
3220 frp = frp->fr_next; in frame_new_height()
3221 while (wfh && frp != NULL && frame_fixed_height(frp)); in frame_new_height()
3226 frp = frp->fr_prev; in frame_new_height()
3227 while (wfh && frp != NULL && frame_fixed_height(frp)); in frame_new_height()
3230 if (frp == NULL) in frame_new_height()
3237 frame_new_height(frp, frp->fr_height + extra_lines, topfirst, wfh); in frame_new_height()
3248 frame_fixed_height(frame_T *frp) in frame_fixed_height() argument
3251 if (frp->fr_win != NULL) in frame_fixed_height()
3252 return frp->fr_win->w_p_wfh; in frame_fixed_height()
3254 if (frp->fr_layout == FR_ROW) in frame_fixed_height()
3258 FOR_ALL_FRAMES(frp, frp->fr_child) in frame_fixed_height()
3259 if (frame_fixed_height(frp)) in frame_fixed_height()
3266 FOR_ALL_FRAMES(frp, frp->fr_child) in frame_fixed_height()
3267 if (!frame_fixed_height(frp)) in frame_fixed_height()
3277 frame_fixed_width(frame_T *frp) in frame_fixed_width() argument
3280 if (frp->fr_win != NULL) in frame_fixed_width()
3281 return frp->fr_win->w_p_wfw; in frame_fixed_width()
3283 if (frp->fr_layout == FR_COL) in frame_fixed_width()
3287 FOR_ALL_FRAMES(frp, frp->fr_child) in frame_fixed_width()
3288 if (frame_fixed_width(frp)) in frame_fixed_width()
3295 FOR_ALL_FRAMES(frp, frp->fr_child) in frame_fixed_width()
3296 if (!frame_fixed_width(frp)) in frame_fixed_width()
3306 frame_add_statusline(frame_T *frp) in frame_add_statusline() argument
3310 if (frp->fr_layout == FR_LEAF) in frame_add_statusline()
3312 wp = frp->fr_win; in frame_add_statusline()
3320 else if (frp->fr_layout == FR_ROW) in frame_add_statusline()
3323 FOR_ALL_FRAMES(frp, frp->fr_child) in frame_add_statusline()
3324 frame_add_statusline(frp); in frame_add_statusline()
3329 for (frp = frp->fr_child; frp->fr_next != NULL; frp = frp->fr_next) in frame_add_statusline()
3331 frame_add_statusline(frp); in frame_add_statusline()
3347 frame_T *frp; in frame_new_width() local
3357 for (frp = topfrp; frp->fr_parent != NULL; frp = frp->fr_parent) in frame_new_width()
3358 if (frp->fr_parent->fr_layout == FR_ROW && frp->fr_next != NULL) in frame_new_width()
3360 if (frp->fr_parent == NULL) in frame_new_width()
3369 FOR_ALL_FRAMES(frp, topfrp->fr_child) in frame_new_width()
3371 frame_new_width(frp, width, leftfirst, wfw); in frame_new_width()
3372 if (frp->fr_width > width) in frame_new_width()
3375 width = frp->fr_width; in frame_new_width()
3379 } while (frp != NULL); in frame_new_width()
3386 frp = topfrp->fr_child; in frame_new_width()
3389 while (frame_fixed_width(frp)) in frame_new_width()
3391 frp = frp->fr_next; in frame_new_width()
3392 if (frp == NULL) in frame_new_width()
3398 while (frp->fr_next != NULL) in frame_new_width()
3399 frp = frp->fr_next; in frame_new_width()
3402 while (frame_fixed_width(frp)) in frame_new_width()
3403 frp = frp->fr_prev; in frame_new_width()
3410 while (frp != NULL) in frame_new_width()
3412 w = frame_minwidth(frp, NULL); in frame_new_width()
3413 if (frp->fr_width + extra_cols < w) in frame_new_width()
3415 extra_cols += frp->fr_width - w; in frame_new_width()
3416 frame_new_width(frp, w, leftfirst, wfw); in frame_new_width()
3420 frame_new_width(frp, frp->fr_width + extra_cols, in frame_new_width()
3427 frp = frp->fr_next; in frame_new_width()
3428 while (wfw && frp != NULL && frame_fixed_width(frp)); in frame_new_width()
3433 frp = frp->fr_prev; in frame_new_width()
3434 while (wfw && frp != NULL && frame_fixed_width(frp)); in frame_new_width()
3437 if (frp == NULL) in frame_new_width()
3444 frame_new_width(frp, frp->fr_width + extra_cols, leftfirst, wfw); in frame_new_width()
3455 frame_add_vsep(frame_T *frp) in frame_add_vsep() argument
3459 if (frp->fr_layout == FR_LEAF) in frame_add_vsep()
3461 wp = frp->fr_win; in frame_add_vsep()
3469 else if (frp->fr_layout == FR_COL) in frame_add_vsep()
3472 FOR_ALL_FRAMES(frp, frp->fr_child) in frame_add_vsep()
3473 frame_add_vsep(frp); in frame_add_vsep()
3478 frp = frp->fr_child; in frame_add_vsep()
3479 while (frp->fr_next != NULL) in frame_add_vsep()
3480 frp = frp->fr_next; in frame_add_vsep()
3481 frame_add_vsep(frp); in frame_add_vsep()
3513 frame_T *frp; in frame_minheight() local
3539 FOR_ALL_FRAMES(frp, topfrp->fr_child) in frame_minheight()
3541 n = frame_minheight(frp, next_curwin); in frame_minheight()
3550 FOR_ALL_FRAMES(frp, topfrp->fr_child) in frame_minheight()
3551 m += frame_minheight(frp, next_curwin); in frame_minheight()
3568 frame_T *frp; in frame_minwidth() local
3588 FOR_ALL_FRAMES(frp, topfrp->fr_child) in frame_minwidth()
3590 n = frame_minwidth(frp, next_curwin); in frame_minwidth()
3599 FOR_ALL_FRAMES(frp, topfrp->fr_child) in frame_minwidth()
3600 m += frame_minwidth(frp, next_curwin); in frame_minwidth()
3816 frame_T *frp = ALLOC_CLEAR_ONE(frame_T); in new_frame() local
3818 wp->w_frame = frp; in new_frame()
3819 if (frp != NULL) in new_frame()
3821 frp->fr_layout = FR_LEAF; in new_frame()
3822 frp->fr_win = wp; in new_frame()
5280 frame_append(frame_T *after, frame_T *frp) in frame_append() argument
5282 frp->fr_next = after->fr_next; in frame_append()
5283 after->fr_next = frp; in frame_append()
5284 if (frp->fr_next != NULL) in frame_append()
5285 frp->fr_next->fr_prev = frp; in frame_append()
5286 frp->fr_prev = after; in frame_append()
5293 frame_insert(frame_T *before, frame_T *frp) in frame_insert() argument
5295 frp->fr_next = before; in frame_insert()
5296 frp->fr_prev = before->fr_prev; in frame_insert()
5297 before->fr_prev = frp; in frame_insert()
5298 if (frp->fr_prev != NULL) in frame_insert()
5299 frp->fr_prev->fr_next = frp; in frame_insert()
5301 frp->fr_parent->fr_child = frp; in frame_insert()
5308 frame_remove(frame_T *frp) in frame_remove() argument
5310 if (frp->fr_prev != NULL) in frame_remove()
5311 frp->fr_prev->fr_next = frp->fr_next; in frame_remove()
5313 frp->fr_parent->fr_child = frp->fr_next; in frame_remove()
5314 if (frp->fr_next != NULL) in frame_remove()
5315 frp->fr_next->fr_prev = frp->fr_prev; in frame_remove()
5478 frame_T *frp; in frame_comp_pos() local
5503 FOR_ALL_FRAMES(frp, topfrp->fr_child) in frame_comp_pos()
5509 frame_comp_pos(frp, row, col); in frame_comp_pos()
5582 frame_T *frp; in frame_setheight() local
5623 FOR_ALL_FRAMES(frp, curfrp->fr_parent->fr_child) in frame_setheight()
5625 if (frp != curfrp in frame_setheight()
5626 && frp->fr_win != NULL in frame_setheight()
5627 && frp->fr_win->w_p_wfh) in frame_setheight()
5628 room_reserved += frp->fr_height; in frame_setheight()
5629 room += frp->fr_height; in frame_setheight()
5630 if (frp != curfrp) in frame_setheight()
5631 room -= frame_minheight(frp, NULL); in frame_setheight()
5693 frp = curfrp->fr_next; // 1st run: start with next window in frame_setheight()
5695 frp = curfrp->fr_prev; // 2nd run: start with prev window in frame_setheight()
5696 while (frp != NULL && take != 0) in frame_setheight()
5698 h = frame_minheight(frp, NULL); in frame_setheight()
5700 && frp->fr_win != NULL in frame_setheight()
5701 && frp->fr_win->w_p_wfh) in frame_setheight()
5703 if (room_reserved >= frp->fr_height) in frame_setheight()
5704 room_reserved -= frp->fr_height; in frame_setheight()
5707 if (frp->fr_height - room_reserved > take) in frame_setheight()
5708 room_reserved = frp->fr_height - take; in frame_setheight()
5709 take -= frp->fr_height - room_reserved; in frame_setheight()
5710 frame_new_height(frp, room_reserved, FALSE, FALSE); in frame_setheight()
5716 if (frp->fr_height - take < h) in frame_setheight()
5718 take -= frp->fr_height - h; in frame_setheight()
5719 frame_new_height(frp, h, FALSE, FALSE); in frame_setheight()
5723 frame_new_height(frp, frp->fr_height - take, in frame_setheight()
5729 frp = frp->fr_next; in frame_setheight()
5731 frp = frp->fr_prev; in frame_setheight()
5783 frame_T *frp; in frame_setwidth() local
5818 FOR_ALL_FRAMES(frp, curfrp->fr_parent->fr_child) in frame_setwidth()
5820 if (frp != curfrp in frame_setwidth()
5821 && frp->fr_win != NULL in frame_setwidth()
5822 && frp->fr_win->w_p_wfw) in frame_setwidth()
5823 room_reserved += frp->fr_width; in frame_setwidth()
5824 room += frp->fr_width; in frame_setwidth()
5825 if (frp != curfrp) in frame_setwidth()
5826 room -= frame_minwidth(frp, NULL); in frame_setwidth()
5869 frp = curfrp->fr_next; // 1st run: start with next window in frame_setwidth()
5871 frp = curfrp->fr_prev; // 2nd run: start with prev window in frame_setwidth()
5872 while (frp != NULL && take != 0) in frame_setwidth()
5874 w = frame_minwidth(frp, NULL); in frame_setwidth()
5876 && frp->fr_win != NULL in frame_setwidth()
5877 && frp->fr_win->w_p_wfw) in frame_setwidth()
5879 if (room_reserved >= frp->fr_width) in frame_setwidth()
5880 room_reserved -= frp->fr_width; in frame_setwidth()
5883 if (frp->fr_width - room_reserved > take) in frame_setwidth()
5884 room_reserved = frp->fr_width - take; in frame_setwidth()
5885 take -= frp->fr_width - room_reserved; in frame_setwidth()
5886 frame_new_width(frp, room_reserved, FALSE, FALSE); in frame_setwidth()
5892 if (frp->fr_width - take < w) in frame_setwidth()
5894 take -= frp->fr_width - w; in frame_setwidth()
5895 frame_new_width(frp, w, FALSE, FALSE); in frame_setwidth()
5899 frame_new_width(frp, frp->fr_width - take, in frame_setwidth()
5905 frp = frp->fr_next; in frame_setwidth()
5907 frp = frp->fr_prev; in frame_setwidth()
6423 frame_T *frp; in command_height() local
6432 frp = lastwin->w_frame; in command_height()
6433 while (frp->fr_width != Columns && frp->fr_parent != NULL) in command_height()
6434 frp = frp->fr_parent; in command_height()
6437 while (frp->fr_prev != NULL && frp->fr_layout == FR_LEAF in command_height()
6438 && frp->fr_win->w_p_wfh) in command_height()
6439 frp = frp->fr_prev; in command_height()
6449 if (frp == NULL) in command_height()
6457 h = frp->fr_height - frame_minheight(frp, NULL); in command_height()
6461 frame_add_height(frp, -h); in command_height()
6462 frp = frp->fr_prev; in command_height()
6481 frame_add_height(frp, (int)(old_p_ch - p_ch)); in command_height()
6484 if (frp != lastwin->w_frame) in command_height()
6493 frame_add_height(frame_T *frp, int n) in frame_add_height() argument
6495 frame_new_height(frp, frp->fr_height + n, FALSE, FALSE); in frame_add_height()
6498 frp = frp->fr_parent; in frame_add_height()
6499 if (frp == NULL) in frame_add_height()
6501 frp->fr_height += n; in frame_add_height()
6730 make_snapshot_rec(frame_T *fr, frame_T **frp) in make_snapshot_rec() argument
6732 *frp = ALLOC_CLEAR_ONE(frame_T); in make_snapshot_rec()
6733 if (*frp == NULL) in make_snapshot_rec()
6735 (*frp)->fr_layout = fr->fr_layout; in make_snapshot_rec()
6736 (*frp)->fr_width = fr->fr_width; in make_snapshot_rec()
6737 (*frp)->fr_height = fr->fr_height; in make_snapshot_rec()
6739 make_snapshot_rec(fr->fr_next, &((*frp)->fr_next)); in make_snapshot_rec()
6741 make_snapshot_rec(fr->fr_child, &((*frp)->fr_child)); in make_snapshot_rec()
6743 (*frp)->fr_win = curwin; in make_snapshot_rec()
6905 frame_T *frp; in frame_check_height() local
6911 FOR_ALL_FRAMES(frp, topfrp->fr_child) in frame_check_height()
6912 if (frp->fr_height != height) in frame_check_height()
6924 frame_T *frp; in frame_check_width() local
6930 FOR_ALL_FRAMES(frp, topfrp->fr_child) in frame_check_width()
6931 if (frp->fr_width != width) in frame_check_width()