Lines Matching refs:wp
51 static int win_do_lines(win_T *wp, int row, int line_count, int mayclear, int del, int clear_attr);
52 static void win_rest_invalid(win_T *wp);
65 conceal_cursor_line(win_T *wp) in conceal_cursor_line() argument
69 if (*wp->w_p_cocu == NUL) in conceal_cursor_line()
81 return vim_strchr(wp->w_p_cocu, c) != NULL; in conceal_cursor_line()
115 get_wcr_attr(win_T *wp) in get_wcr_attr() argument
119 if (*wp->w_p_wcr != NUL) in get_wcr_attr()
120 wcr_attr = syn_name2attr(wp->w_p_wcr); in get_wcr_attr()
122 else if (WIN_IS_POPUP(wp)) in get_wcr_attr()
124 if (wp->w_popup_flags & POPF_INFO) in get_wcr_attr()
139 win_T *wp, in screen_fill_end() argument
150 if (nn > wp->w_width) in screen_fill_end()
151 nn = wp->w_width; in screen_fill_end()
153 if (wp->w_p_rl) in screen_fill_end()
155 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow, in screen_fill_end()
156 W_ENDCOL(wp) - nn, (int)W_ENDCOL(wp) - off, in screen_fill_end()
161 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow, in screen_fill_end()
162 wp->w_wincol + off, (int)wp->w_wincol + nn, in screen_fill_end()
174 win_T *wp, in win_draw_end() argument
184 int wcr_attr = get_wcr_attr(wp); in win_draw_end()
191 int fdc = compute_foldcolumn(wp, 0); in win_draw_end()
195 n = screen_fill_end(wp, ' ', ' ', n, fdc, in win_draw_end()
199 if (signcolumn_on(wp)) in win_draw_end()
201 n = screen_fill_end(wp, ' ', ' ', n, 2, in win_draw_end()
204 if ((wp->w_p_nu || wp->w_p_rnu) in win_draw_end()
207 n = screen_fill_end(wp, ' ', ' ', n, number_width(wp) + 1, in win_draw_end()
212 if (wp->w_p_rl) in win_draw_end()
214 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow, in win_draw_end()
215 wp->w_wincol, W_ENDCOL(wp) - 1 - n, in win_draw_end()
217 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow, in win_draw_end()
218 W_ENDCOL(wp) - 1 - n, W_ENDCOL(wp) - n, in win_draw_end()
224 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + endrow, in win_draw_end()
225 wp->w_wincol + n, (int)W_ENDCOL(wp), in win_draw_end()
229 set_empty_rows(wp, row); in win_draw_end()
238 compute_foldcolumn(win_T *wp, int col) in compute_foldcolumn() argument
240 int fdc = wp->w_p_fdc; in compute_foldcolumn()
241 int wmw = wp == curwin && p_wmw == 0 ? 1 : p_wmw; in compute_foldcolumn()
242 int wwidth = wp->w_width; in compute_foldcolumn()
259 win_T *wp, in fill_foldcolumn() argument
267 int fdc = compute_foldcolumn(wp, 0); in fill_foldcolumn()
848 draw_vsep_win(win_T *wp, int row) in draw_vsep_win() argument
853 if (wp->w_vsep_width) in draw_vsep_win()
857 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + wp->w_height, in draw_vsep_win()
858 W_ENDCOL(wp), W_ENDCOL(wp) + 1, in draw_vsep_win()
1139 stl_connected(win_T *wp) in stl_connected() argument
1143 fr = wp->w_frame; in stl_connected()
1167 win_T *wp, in get_keymap_str() argument
1174 if (wp->w_buffer->b_p_iminsert != B_IMODE_LMAP) in get_keymap_str()
1183 curbuf = wp->w_buffer; in get_keymap_str()
1184 curwin = wp; in get_keymap_str()
1195 if (wp->w_buffer->b_kmap_state & KEYMAP_LOADED) in get_keymap_str()
1196 p = wp->w_buffer->b_p_keymap; in get_keymap_str()
1217 win_T *wp, in win_redr_custom() argument
1247 if (wp == NULL) in win_redr_custom()
1261 row = statusline_row(wp); in win_redr_custom()
1262 fillchar = fillchar_status(&attr, wp); in win_redr_custom()
1263 maxwidth = wp->w_width; in win_redr_custom()
1279 col = ru_col - (Columns - wp->w_width); in win_redr_custom()
1280 if (col < (wp->w_width + 1) / 2) in win_redr_custom()
1281 col = (wp->w_width + 1) / 2; in win_redr_custom()
1282 maxwidth = wp->w_width - col; in win_redr_custom()
1283 if (!wp->w_status_height) in win_redr_custom()
1297 if (*wp->w_p_stl != NUL) in win_redr_custom()
1298 stl = wp->w_p_stl; in win_redr_custom()
1303 *wp->w_p_stl == NUL ? 0 : OPT_LOCAL); in win_redr_custom()
1307 col += wp->w_wincol; in win_redr_custom()
1315 ewp = wp == NULL ? curwin : wp; in win_redr_custom()
1362 else if (wp != NULL && wp != curwin && bt_terminal(wp->w_buffer) in win_redr_custom()
1363 && wp->w_status_height != 0) in win_redr_custom()
1365 else if (wp != NULL && bt_terminal(wp->w_buffer) in win_redr_custom()
1366 && wp->w_status_height != 0) in win_redr_custom()
1369 else if (wp != NULL && wp != curwin && wp->w_status_height != 0) in win_redr_custom()
1376 if (wp == NULL) in win_redr_custom()
2299 redraw_block(int row, int end, win_T *wp) in redraw_block() argument
2308 if (wp == NULL) in redraw_block()
2315 col = wp->w_wincol; in redraw_block()
2316 width = wp->w_width; in redraw_block()
2580 win_T *wp; in screenalloc() local
2653 FOR_ALL_TAB_WINDOWS(tp, wp) in screenalloc()
2654 win_free_lsize(wp); in screenalloc()
2659 FOR_ALL_POPUPWINS(wp) in screenalloc()
2660 win_free_lsize(wp); in screenalloc()
2663 FOR_ALL_POPUPWINS_IN_TAB(tp, wp) in screenalloc()
2664 win_free_lsize(wp); in screenalloc()
2688 FOR_ALL_TAB_WINDOWS(tp, wp) in screenalloc()
2690 if (win_alloc_lines(wp) == FAIL) in screenalloc()
2701 FOR_ALL_POPUPWINS(wp) in screenalloc()
2702 if (win_alloc_lines(wp) == FAIL) in screenalloc()
2709 FOR_ALL_POPUPWINS_IN_TAB(tp, wp) in screenalloc()
2710 if (win_alloc_lines(wp) == FAIL) in screenalloc()
3035 linecopy(int to, int from, win_T *wp) in linecopy() argument
3037 unsigned off_to = LineOffset[to] + wp->w_wincol; in linecopy()
3038 unsigned off_from = LineOffset[from] + wp->w_wincol; in linecopy()
3041 wp->w_width * sizeof(schar_T)); in linecopy()
3047 wp->w_width * sizeof(u8char_T)); in linecopy()
3050 wp->w_width * sizeof(u8char_T)); in linecopy()
3054 wp->w_width * sizeof(schar_T)); in linecopy()
3056 wp->w_width * sizeof(sattr_T)); in linecopy()
3385 win_T *wp, in win_ins_lines() argument
3397 wp->w_lines_valid = 0; in win_ins_lines()
3399 if (wp->w_height < 5) in win_ins_lines()
3402 if (line_count > wp->w_height - row) in win_ins_lines()
3403 line_count = wp->w_height - row; in win_ins_lines()
3405 retval = win_do_lines(wp, row, line_count, mayclear, FALSE, 0); in win_ins_lines()
3416 if (wp->w_next != NULL || wp->w_status_height) in win_ins_lines()
3418 if (screen_del_lines(0, W_WINROW(wp) + wp->w_height - line_count, in win_ins_lines()
3421 else if (wp->w_next) in win_ins_lines()
3429 wp->w_redr_status = TRUE; in win_ins_lines()
3431 nextrow = W_WINROW(wp) + wp->w_height + wp->w_status_height; in win_ins_lines()
3436 wp->w_wincol, (int)W_ENDCOL(wp), in win_ins_lines()
3440 if (screen_ins_lines(0, W_WINROW(wp) + row, line_count, (int)Rows, 0, NULL) in win_ins_lines()
3446 wp->w_redr_status = TRUE; in win_ins_lines()
3447 win_rest_invalid(W_NEXT(wp)); in win_ins_lines()
3464 win_T *wp, in win_del_lines() argument
3474 wp->w_lines_valid = 0; in win_del_lines()
3476 if (line_count > wp->w_height - row) in win_del_lines()
3477 line_count = wp->w_height - row; in win_del_lines()
3479 retval = win_do_lines(wp, row, line_count, mayclear, TRUE, clear_attr); in win_del_lines()
3483 if (screen_del_lines(0, W_WINROW(wp) + row, line_count, in win_del_lines()
3491 if (wp->w_next || wp->w_status_height || cmdline_row < Rows - 1) in win_del_lines()
3493 if (screen_ins_lines(0, W_WINROW(wp) + wp->w_height - line_count, in win_del_lines()
3496 wp->w_redr_status = TRUE; in win_del_lines()
3497 win_rest_invalid(wp->w_next); in win_del_lines()
3516 win_T *wp, in win_do_lines() argument
3534 if (mayclear && Rows - line_count < 5 && wp->w_width == Columns) in win_do_lines()
3548 if (row + line_count >= wp->w_height) in win_do_lines()
3550 screen_fill(W_WINROW(wp) + row, W_WINROW(wp) + wp->w_height, in win_do_lines()
3551 wp->w_wincol, (int)W_ENDCOL(wp), in win_do_lines()
3573 if (scroll_region || wp->w_width != Columns) in win_do_lines()
3575 if (scroll_region && (wp->w_width == Columns || *T_CSV != NUL)) in win_do_lines()
3576 scroll_region_set(wp, row); in win_do_lines()
3578 retval = screen_del_lines(W_WINROW(wp) + row, 0, line_count, in win_do_lines()
3579 wp->w_height - row, FALSE, clear_attr, wp); in win_do_lines()
3581 retval = screen_ins_lines(W_WINROW(wp) + row, 0, line_count, in win_do_lines()
3582 wp->w_height - row, clear_attr, wp); in win_do_lines()
3583 if (scroll_region && (wp->w_width == Columns || *T_CSV != NUL)) in win_do_lines()
3588 if (wp->w_next != NULL && p_tf) // don't delete/insert on fast terminal in win_do_lines()
3598 win_rest_invalid(win_T *wp) in win_rest_invalid() argument
3600 while (wp != NULL) in win_rest_invalid()
3602 redraw_win_later(wp, NOT_VALID); in win_rest_invalid()
3603 wp->w_redr_status = TRUE; in win_rest_invalid()
3604 wp = wp->w_next; in win_rest_invalid()
3647 win_T *wp) // NULL or window to use width from in screen_ins_lines() argument
3705 if (wp != NULL && wp->w_width != Columns && *T_CSV == NUL) in screen_ins_lines()
3730 return screen_del_lines(off, row, line_count, end, FALSE, 0, wp); in screen_ins_lines()
3738 screen_del_lines(off, end - line_count, line_count, end, FALSE, 0, wp); in screen_ins_lines()
3743 if (off + row > 0 || (wp != NULL && wp->w_width != Columns)) in screen_ins_lines()
3759 if (wp != NULL && wp->w_wincol != 0 && *T_CSV != NUL && *T_CCS == NUL) in screen_ins_lines()
3760 cursor_col = wp->w_wincol; in screen_ins_lines()
3775 if (wp != NULL && wp->w_width != Columns) in screen_ins_lines()
3780 linecopy(j + line_count, j, wp); in screen_ins_lines()
3783 lineclear(LineOffset[j] + wp->w_wincol, wp->w_width, in screen_ins_lines()
3786 lineinvalid(LineOffset[j] + wp->w_wincol, wp->w_width); in screen_ins_lines()
3818 redraw_block(row, end, wp); in screen_ins_lines()
3878 win_T *wp UNUSED) // NULL or window to use width from in screen_del_lines()
3930 if (wp != NULL && wp->w_width != Columns && *T_CSV == NUL) in screen_del_lines()
3945 && (wp == NULL || wp->w_width == Columns)) in screen_del_lines()
3957 if (off + row > 0 || (wp != NULL && wp->w_width != Columns)) in screen_del_lines()
3974 if (wp != NULL && wp->w_wincol != 0 && *T_CSV != NUL && *T_CCS == NUL) in screen_del_lines()
3975 cursor_col = wp->w_wincol; in screen_del_lines()
3996 if (wp != NULL && wp->w_width != Columns) in screen_del_lines()
4001 linecopy(j - line_count, j, wp); in screen_del_lines()
4004 lineclear(LineOffset[j] + wp->w_wincol, wp->w_width, in screen_del_lines()
4007 lineinvalid(LineOffset[j] + wp->w_wincol, wp->w_width); in screen_del_lines()
4040 redraw_block(row, end, wp); in screen_del_lines()
4389 win_T *wp; in draw_tabline() local
4472 wp = firstwin; in draw_tabline()
4477 wp = tp->tp_firstwin; in draw_tabline()
4481 for (wincount = 0; wp != NULL; wp = wp->w_next, ++wincount) in draw_tabline()
4482 if (bufIsChanged(wp->w_buffer)) in draw_tabline()
4577 fillchar_status(int *attr, win_T *wp) in fillchar_status() argument
4582 if (bt_terminal(wp->w_buffer)) in fillchar_status()
4584 if (wp == curwin) in fillchar_status()
4597 if (wp == curwin) in fillchar_status()
4611 || wp != curwin || ONE_WINDOW) in fillchar_status()
4614 if (wp == curwin) in fillchar_status()
4716 number_width(win_T *wp) in number_width() argument
4721 if (wp->w_p_rnu && !wp->w_p_nu) in number_width()
4723 lnum = wp->w_height; in number_width()
4726 lnum = wp->w_buffer->b_ml.ml_line_count; in number_width()
4728 if (lnum == wp->w_nrwidth_line_count && wp->w_nuw_cached == wp->w_p_nuw) in number_width()
4729 return wp->w_nrwidth_width; in number_width()
4730 wp->w_nrwidth_line_count = lnum; in number_width()
4740 if (n < wp->w_p_nuw - 1) in number_width()
4741 n = wp->w_p_nuw - 1; in number_width()
4746 if (n < 2 && get_first_valid_sign(wp) != NULL in number_width()
4747 && (*wp->w_p_scl == 'n' && *(wp->w_p_scl + 1) == 'u')) in number_width()
4751 wp->w_nrwidth_width = n; in number_width()
4752 wp->w_nuw_cached = wp->w_p_nuw; in number_width()
4814 set_chars_option(win_T *wp, char_u **varp) in set_chars_option() argument
4857 if (varp == &p_lcs || varp == &wp->w_p_lcs) in set_chars_option()
4862 if (varp == &wp->w_p_lcs && wp->w_p_lcs[0] == NUL) in set_chars_option()
4881 ((varp == &p_lcs || varp == &wp->w_p_lcs) ? NUL : ' '); in set_chars_option()
4883 if (varp == &p_lcs || varp == &wp->w_p_lcs) in set_chars_option()
4957 if ((varp == &p_lcs || varp == &wp->w_p_lcs) in set_chars_option()
5003 if (wp->w_lcs_chars.multispace != NULL) in set_chars_option()
5004 vim_free(wp->w_lcs_chars.multispace); in set_chars_option()
5005 wp->w_lcs_chars = lcs_chars; in set_chars_option()