Lines Matching refs:curwin
147 if (wp != curwin) in get_fpos_of_mouse()
151 if (mouse_comp_pos(curwin, &row, &col, &mpos->lnum, NULL)) in get_fpos_of_mouse()
223 win_T *old_curwin = curwin; in do_mouse()
233 save_cursor = curwin->w_cursor; in do_mouse()
491 if (curwin != old_curwin) in do_mouse()
572 if (mouse_row < curwin->w_winrow in do_mouse()
574 > (curwin->w_winrow + curwin->w_height)) in do_mouse()
580 if ((LT_POS(curwin->w_cursor, VIsual) in do_mouse()
581 && (LT_POS(m_pos, curwin->w_cursor) in do_mouse()
583 || (LT_POS(VIsual, curwin->w_cursor) in do_mouse()
585 || LT_POS(curwin->w_cursor, m_pos)))) in do_mouse()
591 getvcols(curwin, &curwin->w_cursor, &VIsual, in do_mouse()
593 getvcol(curwin, &m_pos, NULL, &m_pos.col, NULL); in do_mouse()
647 if (LT_POS(curwin->w_cursor, VIsual)) in do_mouse()
649 start_visual = curwin->w_cursor; in do_mouse()
655 end_visual = curwin->w_cursor; in do_mouse()
703 if (curwin != old_curwin && oap != NULL && oap->op_type != OP_NOP) in do_mouse()
714 openFold(curwin->w_cursor.lnum, 1L); in do_mouse()
716 closeFold(curwin->w_cursor.lnum, 1L); in do_mouse()
718 if (curwin == old_curwin) in do_mouse()
719 curwin->w_cursor = save_cursor; in do_mouse()
759 getvcols(curwin, &start_visual, &end_visual, &leftcol, &rightcol); in do_mouse()
760 if (curwin->w_curswant > (leftcol + rightcol) / 2) in do_mouse()
764 if (curwin->w_cursor.lnum >= in do_mouse()
769 start_visual = curwin->w_cursor; // save the cursor pos in do_mouse()
770 curwin->w_cursor = end_visual; in do_mouse()
772 VIsual = curwin->w_cursor; in do_mouse()
773 curwin->w_cursor = start_visual; // restore the cursor in do_mouse()
780 if (LT_POS(curwin->w_cursor, start_visual)) in do_mouse()
782 else if (LT_POS(end_visual, curwin->w_cursor)) in do_mouse()
789 if (curwin->w_cursor.col - start_visual.col > in do_mouse()
790 end_visual.col - curwin->w_cursor.col) in do_mouse()
799 diff = (curwin->w_cursor.lnum - start_visual.lnum) - in do_mouse()
800 (end_visual.lnum - curwin->w_cursor.lnum); in do_mouse()
808 if (curwin->w_cursor.col < in do_mouse()
852 where_paste_started = curwin->w_cursor; in do_mouse()
863 if (curwin->w_llist_ref == NULL) // quickfix window in do_mouse()
925 VIsual = curwin->w_cursor; in do_mouse()
962 end_visual = curwin->w_cursor; in do_mouse()
970 && EQUAL_POS(curwin->w_cursor, VIsual) in do_mouse()
973 curwin->w_cursor = *pos; in do_mouse()
978 if (LT_POS(curwin->w_cursor, VIsual)) in do_mouse()
981 ++curwin->w_cursor.col; in do_mouse()
990 if (LT_POS(curwin->w_cursor, orig_cursor)) in do_mouse()
992 find_start_of_word(&curwin->w_cursor); in do_mouse()
999 curwin->w_cursor.col += in do_mouse()
1001 find_end_of_word(&curwin->w_cursor); in do_mouse()
1004 curwin->w_set_curswant = TRUE; in do_mouse()
1030 win_T *old_curwin = curwin; in ins_mouse()
1040 tpos = curwin->w_cursor; in ins_mouse()
1043 win_T *new_curwin = curwin; in ins_mouse()
1045 if (curwin != old_curwin && win_valid(old_curwin)) in ins_mouse()
1049 curwin = old_curwin; in ins_mouse()
1050 curbuf = curwin->w_buffer; in ins_mouse()
1057 start_arrow(curwin == old_curwin ? &tpos : NULL); in ins_mouse()
1058 if (curwin != new_curwin && win_valid(new_curwin)) in ins_mouse()
1060 curwin = new_curwin; in ins_mouse()
1061 curbuf = curwin->w_buffer; in ins_mouse()
1076 win_T *old_curwin = curwin, *wp; in ins_mousescroll()
1079 tpos = curwin->w_cursor; in ins_mousescroll()
1092 curwin = wp; in ins_mousescroll()
1093 curbuf = curwin->w_buffer; in ins_mousescroll()
1095 if (curwin == old_curwin) in ins_mousescroll()
1099 if (!pum_visible() || curwin != old_curwin) in ins_mousescroll()
1105 (long)(curwin->w_botline - curwin->w_topline)); in ins_mousescroll()
1109 if (WIN_IS_POPUP(curwin)) in ins_mousescroll()
1110 popup_set_firstline(curwin); in ins_mousescroll()
1119 step = curwin->w_width; in ins_mousescroll()
1120 val = curwin->w_leftcol + (dir == MSCR_RIGHT ? -step : step); in ins_mousescroll()
1129 curwin->w_redr_status = TRUE; in ins_mousescroll()
1131 curwin = old_curwin; in ins_mousescroll()
1132 curbuf = curwin->w_buffer; in ins_mousescroll()
1143 if (!EQUAL_POS(curwin->w_cursor, tpos)) in ins_mousescroll()
1576 if (cmdwin_type != 0 && row < curwin->w_winrow) in jump_to_mouse()
1612 old_curwin = curwin; in jump_to_mouse()
1613 old_cursor = curwin->w_cursor; in jump_to_mouse()
1705 && (wp->w_buffer != curwin->w_buffer in jump_to_mouse()
1714 + (cmdwin_type == 0 && wp == curwin ? 0 : 1) in jump_to_mouse()
1724 if (cmdwin_type != 0 && wp != curwin) in jump_to_mouse()
1736 wp = curwin; in jump_to_mouse()
1741 if (popup_is_popup(curwin) && curbuf->b_term != NULL) in jump_to_mouse()
1751 if (curwin != old_curwin) in jump_to_mouse()
1755 set_mouse_topline(curwin); in jump_to_mouse()
1765 if (curwin == old_curwin) in jump_to_mouse()
1773 if (curwin == old_curwin) in jump_to_mouse()
1779 curwin->w_cursor.lnum = curwin->w_topline; in jump_to_mouse()
1782 gui_prev_topline = curwin->w_topline; in jump_to_mouse()
1784 gui_prev_topfill = curwin->w_topfill; in jump_to_mouse()
1830 if (cmdwin_type != 0 && row < curwin->w_winrow) in jump_to_mouse()
1848 row -= W_WINROW(curwin); in jump_to_mouse()
1849 col -= curwin->w_wincol; in jump_to_mouse()
1856 for (first = TRUE; curwin->w_topline > 1; ) in jump_to_mouse()
1859 if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)) in jump_to_mouse()
1863 count += plines(curwin->w_topline - 1); in jump_to_mouse()
1868 (void)hasFolding(curwin->w_topline, &curwin->w_topline, NULL); in jump_to_mouse()
1871 if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)) in jump_to_mouse()
1872 ++curwin->w_topfill; in jump_to_mouse()
1876 --curwin->w_topline; in jump_to_mouse()
1878 curwin->w_topfill = 0; in jump_to_mouse()
1883 check_topfill(curwin, FALSE); in jump_to_mouse()
1885 curwin->w_valid &= in jump_to_mouse()
1890 else if (row >= curwin->w_height) in jump_to_mouse()
1893 for (first = TRUE; curwin->w_topline < curbuf->b_ml.ml_line_count; ) in jump_to_mouse()
1896 if (curwin->w_topfill > 0) in jump_to_mouse()
1900 count += plines(curwin->w_topline); in jump_to_mouse()
1901 if (!first && count > row - curwin->w_height + 1) in jump_to_mouse()
1905 if (hasFolding(curwin->w_topline, NULL, &curwin->w_topline) in jump_to_mouse()
1906 && curwin->w_topline == curbuf->b_ml.ml_line_count) in jump_to_mouse()
1910 if (curwin->w_topfill > 0) in jump_to_mouse()
1911 --curwin->w_topfill; in jump_to_mouse()
1915 ++curwin->w_topline; in jump_to_mouse()
1917 curwin->w_topfill = in jump_to_mouse()
1918 diff_check_fill(curwin, curwin->w_topline); in jump_to_mouse()
1923 check_topfill(curwin, FALSE); in jump_to_mouse()
1926 curwin->w_valid &= in jump_to_mouse()
1928 row = curwin->w_height - 1; in jump_to_mouse()
1936 && curwin->w_cursor.lnum in jump_to_mouse()
1937 == curwin->w_buffer->b_ml.ml_line_count in jump_to_mouse()
1938 && curwin->w_cursor.lnum == curwin->w_topline) in jump_to_mouse()
1939 curwin->w_valid &= ~(VALID_TOPLINE); in jump_to_mouse()
1947 curwin->w_p_rl ? col < curwin->w_width - curwin->w_p_fdc : in jump_to_mouse()
1949 col >= curwin->w_p_fdc in jump_to_mouse()
1958 if (mouse_comp_pos(curwin, &row, &col, &curwin->w_cursor.lnum, NULL)) in jump_to_mouse()
1975 curwin->w_curswant = col; in jump_to_mouse()
1976 curwin->w_set_curswant = FALSE; // May still have been TRUE in jump_to_mouse()
1987 if (curwin != old_curwin || curwin->w_cursor.lnum != old_cursor.lnum in jump_to_mouse()
1988 || curwin->w_cursor.col != old_cursor.col) in jump_to_mouse()
2010 win_T *old_curwin = curwin, *wp; in nv_mousescroll()
2027 curwin = wp; in nv_mousescroll()
2028 curbuf = curwin->w_buffer; in nv_mousescroll()
2047 if (curwin->w_height < 6) in nv_mousescroll()
2049 cap->count1 = curwin->w_height / 2; in nv_mousescroll()
2059 if (WIN_IS_POPUP(curwin)) in nv_mousescroll()
2060 popup_set_firstline(curwin); in nv_mousescroll()
2067 if (!curwin->w_p_wrap) in nv_mousescroll()
2072 step = curwin->w_width; in nv_mousescroll()
2073 val = curwin->w_leftcol + (cap->arg == MSCR_RIGHT ? -step : +step); in nv_mousescroll()
2082 if (curwin != old_curwin && curwin->w_p_cul) in nv_mousescroll()
2083 redraw_for_cursorline(curwin); in nv_mousescroll()
2086 curwin->w_redr_status = TRUE; in nv_mousescroll()
2088 curwin = old_curwin; in nv_mousescroll()
2089 curbuf = curwin->w_buffer; in nv_mousescroll()
2768 && (is_mouse_topline(curwin) in check_termcode_mouse()
2778 set_mouse_topline(curwin); in check_termcode_mouse()