Lines Matching refs:w_cursor
37 pos = curwin->w_cursor; in findsent()
154 curwin->w_cursor = pos; in findsent()
185 curr = curwin->w_cursor.lnum; in findpar()
228 curwin->w_cursor.lnum = curr; in findpar()
235 if ((curwin->w_cursor.col = (colnr_T)STRLEN(line)) != 0) in findpar()
237 --curwin->w_cursor.col; in findpar()
238 curwin->w_cursor.col -= in findpar()
239 (*mb_head_off)(line, line + curwin->w_cursor.col); in findpar()
244 curwin->w_cursor.col = 0; in findpar()
370 curwin->w_cursor.coladd = 0; in fwd_word()
377 if (hasFolding(curwin->w_cursor.lnum, NULL, &curwin->w_cursor.lnum)) in fwd_word()
386 last_line = (curwin->w_cursor.lnum == curbuf->b_ml.ml_line_count); in fwd_word()
412 if (curwin->w_cursor.col == 0 && *ml_get_curline() == NUL) in fwd_word()
435 curwin->w_cursor.coladd = 0; in bck_word()
442 if (hasFolding(curwin->w_cursor.lnum, &curwin->w_cursor.lnum, NULL)) in bck_word()
443 curwin->w_cursor.col = 0; in bck_word()
457 if (curwin->w_cursor.col == 0 in bck_word()
458 && LINEEMPTY(curwin->w_cursor.lnum)) in bck_word()
502 curwin->w_cursor.coladd = 0; in end_word()
509 if (hasFolding(curwin->w_cursor.lnum, NULL, &curwin->w_cursor.lnum)) in end_word()
536 if (empty && curwin->w_cursor.col == 0 in end_word()
537 && LINEEMPTY(curwin->w_cursor.lnum)) in end_word()
570 curwin->w_cursor.coladd = 0; in bckend_word()
595 if (curwin->w_cursor.col == 0 && LINEEMPTY(curwin->w_cursor.lnum)) in bckend_word()
629 if (curwin->w_cursor.col == 0) // stop at start of line in back_in_line()
668 find_first_blank(&curwin->w_cursor); in findsent_forward()
670 decl(&curwin->w_cursor); in findsent_forward()
695 if (VIsual_active && *p_sel == 'e' && LT_POS(VIsual, curwin->w_cursor)) in current_word()
702 if (!VIsual_active || EQUAL_POS(curwin->w_cursor, VIsual)) in current_word()
708 start_pos = curwin->w_cursor; in current_word()
730 if (curwin->w_cursor.col == 0) in current_word()
731 decl(&curwin->w_cursor); in current_word()
759 if (VIsual_active && LT_POS(curwin->w_cursor, VIsual)) in current_word()
764 if (decl(&curwin->w_cursor) == -1) in current_word()
775 (void)incl(&curwin->w_cursor); in current_word()
783 if (incl(&curwin->w_cursor) == -1) in current_word()
807 || (curwin->w_cursor.col == 0 && !inclusive))) in current_word()
817 pos = curwin->w_cursor; // save cursor position in current_word()
818 curwin->w_cursor = start_pos; in current_word()
822 if (cls() == 0 && curwin->w_cursor.col > 0) in current_word()
825 VIsual = curwin->w_cursor; in current_word()
827 oap->start = curwin->w_cursor; in current_word()
830 curwin->w_cursor = pos; // put cursor back at end in current_word()
835 if (*p_sel == 'e' && inclusive && LTOREQ_POS(VIsual, curwin->w_cursor)) in current_word()
863 start_pos = curwin->w_cursor; in current_sent()
884 while (LT_POS(pos, curwin->w_cursor)) in current_sent()
897 if (EQUAL_POS(curwin->w_cursor, start_pos)) in current_sent()
908 find_first_blank(&curwin->w_cursor); in current_sent()
927 if (!EQUAL_POS(pos, curwin->w_cursor)) in current_sent()
930 while (LT_POS(pos, curwin->w_cursor)) in current_sent()
943 curwin->w_cursor = start_pos; in current_sent()
950 ++curwin->w_cursor.col; in current_sent()
961 if (EQUAL_POS(pos, curwin->w_cursor)) in current_sent()
970 start_pos = curwin->w_cursor; in current_sent()
983 decl(&curwin->w_cursor); in current_sent()
994 find_first_blank(&curwin->w_cursor); in current_sent()
995 c = gchar_pos(&curwin->w_cursor); // VIM_ISWHITE() is a macro in current_sent()
997 decl(&curwin->w_cursor); in current_sent()
1006 if (EQUAL_POS(start_pos, curwin->w_cursor)) in current_sent()
1009 ++curwin->w_cursor.col; in current_sent()
1018 if (incl(&curwin->w_cursor) == -1) in current_sent()
1048 old_pos = curwin->w_cursor; in current_block()
1049 old_end = curwin->w_cursor; // remember where we started in current_block()
1055 if (!VIsual_active || EQUAL_POS(VIsual, curwin->w_cursor)) in current_block()
1064 ++curwin->w_cursor.col; in current_block()
1066 else if (LT_POS(VIsual, curwin->w_cursor)) in current_block()
1069 curwin->w_cursor = VIsual; // cursor at low end of Visual in current_block()
1088 curwin->w_cursor = *pos; in current_block()
1098 curwin->w_cursor = *pos; in current_block()
1110 curwin->w_cursor = old_pos; in current_block()
1113 curwin->w_cursor = *end_pos; in current_block()
1124 sol = (curwin->w_cursor.col == 0); in current_block()
1125 decl(&curwin->w_cursor); in current_block()
1129 if (decl(&curwin->w_cursor) != 0) in current_block()
1137 if (!LT_POS(start_pos, old_start) && !LT_POS(old_end, curwin->w_cursor) in current_block()
1140 curwin->w_cursor = old_start; in current_block()
1141 decl(&curwin->w_cursor); in current_block()
1144 curwin->w_cursor = old_pos; in current_block()
1148 curwin->w_cursor = *pos; in current_block()
1151 curwin->w_cursor = old_pos; in current_block()
1154 curwin->w_cursor = *end_pos; in current_block()
1163 inc(&curwin->w_cursor); in current_block()
1165 inc(&curwin->w_cursor); // include the line break in current_block()
1177 incl(&curwin->w_cursor); in current_block()
1178 else if (LTOREQ_POS(start_pos, curwin->w_cursor)) in current_block()
1184 curwin->w_cursor = start_pos; in current_block()
1210 for (p = line; p < line + curwin->w_cursor.col; MB_PTR_ADV(p)) in in_html_tag()
1225 for (p = line + curwin->w_cursor.col; p > line; ) in in_html_tag()
1237 pos.lnum = curwin->w_cursor.lnum; in in_html_tag()
1289 old_pos = curwin->w_cursor; in current_tagblock()
1290 old_end = curwin->w_cursor; // remember where we started in current_tagblock()
1298 if (!VIsual_active || EQUAL_POS(VIsual, curwin->w_cursor)) in current_tagblock()
1321 old_end = curwin->w_cursor; in current_tagblock()
1324 else if (LT_POS(VIsual, curwin->w_cursor)) in current_tagblock()
1327 curwin->w_cursor = VIsual; // cursor at low end of Visual in current_tagblock()
1344 curwin->w_cursor = old_pos; in current_tagblock()
1348 start_pos = curwin->w_cursor; in current_tagblock()
1360 curwin->w_cursor = old_pos; in current_tagblock()
1369 curwin->w_cursor = old_pos; in current_tagblock()
1381 if (r < 1 || LT_POS(curwin->w_cursor, old_end)) in current_tagblock()
1387 curwin->w_cursor = start_pos; in current_tagblock()
1405 if (*c == '<' && !VIsual_active && curwin->w_cursor.col == 0) in current_tagblock()
1411 end_pos = curwin->w_cursor; in current_tagblock()
1416 curwin->w_cursor = start_pos; in current_tagblock()
1421 start_pos = curwin->w_cursor; in current_tagblock()
1424 curwin->w_cursor = end_pos; in current_tagblock()
1432 curwin->w_cursor = old_start; in current_tagblock()
1443 curwin->w_cursor = start_pos; in current_tagblock()
1459 curwin->w_cursor = start_pos; in current_tagblock()
1493 start_lnum = curwin->w_cursor.lnum; in current_par()
1544 curwin->w_cursor.lnum = start_lnum; in current_par()
1545 curwin->w_cursor.col = 0; in current_par()
1623 if (VIsual_mode == 'V' && start_lnum == curwin->w_cursor.lnum) in current_par()
1640 curwin->w_cursor.lnum = end_lnum; in current_par()
1641 curwin->w_cursor.col = 0; in current_par()
1723 int col_start = curwin->w_cursor.col; in current_quote()
1739 if (VIsual.lnum != curwin->w_cursor.lnum) in current_quote()
1742 vis_bef_curs = LT_POS(VIsual, curwin->w_cursor); in current_quote()
1743 vis_empty = EQUAL_POS(VIsual, curwin->w_cursor); in current_quote()
1756 vis_empty = EQUAL_POS(VIsual, curwin->w_cursor); in current_quote()
1760 pos_T t = curwin->w_cursor; in current_quote()
1762 curwin->w_cursor = VIsual; in current_quote()
1778 && line[curwin->w_cursor.col] != NUL in current_quote()
1779 && line[curwin->w_cursor.col + 1] == quotechar; in current_quote()
1781 col_end = curwin->w_cursor.col; in current_quote()
1785 inside_quotes = curwin->w_cursor.col > 0 in current_quote()
1786 && line[curwin->w_cursor.col - 1] == quotechar in current_quote()
1789 i = curwin->w_cursor.col; in current_quote()
1819 col_start = curwin->w_cursor.col; in current_quote()
1833 col_end = curwin->w_cursor.col; in current_quote()
1909 curwin->w_cursor.col = col_start; in current_quote()
1923 VIsual = curwin->w_cursor; in current_quote()
1929 oap->start = curwin->w_cursor; in current_quote()
1934 curwin->w_cursor.col = col_end; in current_quote()
1959 VIsual = curwin->w_cursor; in current_quote()
1961 curwin->w_cursor.col = col_start; in current_quote()
1984 pos_T t = curwin->w_cursor; in current_quote()
1986 curwin->w_cursor = VIsual; in current_quote()