Lines Matching refs:w_cursor

188 	pos_T   save_cursor = curwin->w_cursor;  in edit()
212 if (!EQUAL_POS(curwin->w_cursor, save_cursor) in edit()
220 curwin->w_cursor = save_cursor; in edit()
241 Insstart = curwin->w_cursor; in edit()
367 if (((ins_at_eol && curwin->w_cursor.lnum == o_lnum) in edit()
369 && *(ptr = ml_get_curline() + curwin->w_cursor.col) != NUL) in edit()
372 ++curwin->w_cursor.col; in edit()
377 curwin->w_cursor.col += i; in edit()
534 && (curwin->w_cursor.lnum != curwin->w_topline in edit()
628 && curwin->w_cursor.col >= ins_compl_col() in edit()
633 && curwin->w_cursor.col > ins_compl_col() in edit()
832 o_lnum = curwin->w_cursor.lnum; in edit()
1349 && curwin->w_cursor.lnum == Insstart.lnum) in edit()
1447 && !EQUAL_POS(last_cursormoved, curwin->w_cursor) in ins_redraw()
1473 conceal_new_cursor_line = curwin->w_cursor.lnum; in ins_redraw()
1477 last_cursormoved = curwin->w_cursor; in ins_redraw()
1494 u_save(curwin->w_cursor.lnum, in ins_redraw()
1495 (linenr_T)(curwin->w_cursor.lnum + 1)); in ins_redraw()
1514 u_save(curwin->w_cursor.lnum, in ins_redraw()
1515 (linenr_T)(curwin->w_cursor.lnum + 1)); in ins_redraw()
1532 ? curwin->w_cursor.lnum : conceal_new_cursor_line); in ins_redraw()
1733 redrawWinline(curwin, curwin->w_cursor.lnum); in edit_unputchar()
1752 save_col = curwin->w_cursor.col; in display_dollar()
1753 curwin->w_cursor.col = col; in display_dollar()
1760 curwin->w_cursor.col -= (*mb_head_off)(p, p + col); in display_dollar()
1768 curwin->w_cursor.col = save_col; in display_dollar()
1781 redrawWinline(curwin, curwin->w_cursor.lnum); in undisplay_dollar()
1813 while ((int)curwin->w_cursor.col > col) in backspace_until_column()
1815 curwin->w_cursor.col--; in backspace_until_column()
1833 colnr_T ecol = curwin->w_cursor.col + 1; in del_char_after_col()
1839 while (curwin->w_cursor.col < (colnr_T)limit_col) in del_char_after_col()
1845 curwin->w_cursor.col += l; in del_char_after_col()
1847 if (*ml_get_cursor() == NUL || curwin->w_cursor.col == ecol) in del_char_after_col()
1849 del_bytes((long)((int)ecol - curwin->w_cursor.col), FALSE, TRUE); in del_char_after_col()
2084 && (curwin->w_cursor.lnum != Insstart.lnum in insertchar()
2101 do_internal = (fex_format(curwin->w_cursor.lnum, 1L, c) != 0); in insertchar()
2143 i = curwin->w_cursor.col; in insertchar()
2367 Insstart = curwin->w_cursor; // new insertion starts here in stop_arrow()
2445 pos_T tpos = curwin->w_cursor; in stop_insert()
2451 if (curwin->w_cursor.col > 0 && gchar_cursor() == NUL) in stop_insert()
2456 curwin->w_cursor = tpos; in stop_insert()
2468 && curwin->w_cursor.lnum == tpos.lnum in stop_insert()
2469 && curwin->w_cursor.col == tpos.col) in stop_insert()
2470 curwin->w_cursor.coladd = tpos.coladd; in stop_insert()
2483 && curwin->w_cursor.lnum != end_insert_pos->lnum)) in stop_insert()
2486 pos_T tpos = curwin->w_cursor; in stop_insert()
2488 curwin->w_cursor = *end_insert_pos; in stop_insert()
2492 if (gchar_cursor() == NUL && curwin->w_cursor.col > 0) in stop_insert()
2493 --curwin->w_cursor.col; in stop_insert()
2500 if (curwin->w_cursor.lnum != tpos.lnum) in stop_insert()
2501 curwin->w_cursor = tpos; in stop_insert()
2505 tpos = curwin->w_cursor; in stop_insert()
2508 ++curwin->w_cursor.col; // put cursor back on the NUL in stop_insert()
2513 if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum) in stop_insert()
2625 curwin->w_cursor.col = 0; in beginline()
2626 curwin->w_cursor.coladd = 0; in beginline()
2634 ++curwin->w_cursor.col; in beginline()
2656 pos_T prevpos = curwin->w_cursor; in oneright()
2665 return (prevpos.col != curwin->w_cursor.col in oneright()
2666 || prevpos.coladd != curwin->w_cursor.coladd) ? OK : FAIL; in oneright()
2682 curwin->w_cursor.col += l; in oneright()
2719 if (curwin->w_cursor.coladd == 1) in oneleft()
2727 curwin->w_cursor.coladd = 0; in oneleft()
2734 if (curwin->w_cursor.col == 0) in oneleft()
2738 --curwin->w_cursor.col; in oneleft()
2756 lnum = curwin->w_cursor.lnum; in cursor_up()
2791 curwin->w_cursor.lnum = lnum; in cursor_up()
2815 lnum = curwin->w_cursor.lnum; in cursor_down()
2850 curwin->w_cursor.lnum = lnum; in cursor_down()
2970 return check_abbr(c, ml_get_curline(), curwin->w_cursor.col, in echeck_abbr()
2971 curwin->w_cursor.lnum == Insstart.lnum ? Insstart.col : 0); in echeck_abbr()
3201 getvcol(curwin, &curwin->w_cursor, NULL, &start_vcol, NULL); in replace_do_bs()
3234 curwin->w_cursor.col += ins_len; in replace_do_bs()
3240 curwin->w_cursor.col -= ins_len; in replace_do_bs()
3244 changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col); in replace_do_bs()
3252 adjust_prop_columns(curwin->w_cursor.lnum, curwin->w_cursor.col, in replace_do_bs()
3398 pos_T curpos = curwin->w_cursor; in ins_reg()
3409 curwin->w_cursor = curpos; in ins_reg()
3507 Insstart = curwin->w_cursor; in ins_ctrl_g()
3598 temp = curwin->w_cursor.col; in ins_esc()
3638 stop_insert(&curwin->w_cursor, TRUE, nomove); in ins_esc()
3647 if (restart_edit == NUL && (colnr_T)temp == curwin->w_cursor.col) in ins_esc()
3652 curbuf->b_last_insert = curwin->w_cursor; in ins_esc()
3659 && (curwin->w_cursor.col != 0 in ins_esc()
3660 || curwin->w_cursor.coladd > 0) in ins_esc()
3668 if (curwin->w_cursor.coladd > 0 || get_ve_flags() == VE_ALL) in ins_esc()
3672 ++curwin->w_cursor.coladd; in ins_esc()
3676 --curwin->w_cursor.col; in ins_esc()
3739 ++curwin->w_cursor.col; in ins_ctrl_()
3745 revins_scol = curwin->w_cursor.col; in ins_ctrl_()
3873 && curwin->w_cursor.col > 0) in ins_shift()
3875 --curwin->w_cursor.col; in ins_shift()
3908 temp = curwin->w_cursor.col; in ins_del()
3914 curwin->w_cursor.col = temp; in ins_del()
3941 getvcol(curwin, &curwin->w_cursor, vcolp, NULL, NULL); in ins_bs_one()
3946 if (curwin->w_cursor.lnum != Insstart.lnum in ins_bs_one()
3947 || curwin->w_cursor.col >= Insstart.col) in ins_bs_one()
3985 ((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0) in ins_bs()
3991 ) || (curwin->w_cursor.lnum == Insstart_orig.lnum in ins_bs()
3992 && curwin->w_cursor.col <= Insstart_orig.col))) in ins_bs()
3994 && curwin->w_cursor.col <= ai_col) in ins_bs()
3995 || (!can_bs(BS_EOL) && curwin->w_cursor.col == 0)))) in ins_bs()
4018 if (curwin->w_cursor.coladd > 0) in ins_bs()
4022 --curwin->w_cursor.coladd; in ins_bs()
4027 curwin->w_cursor.coladd = 0; in ins_bs()
4030 curwin->w_cursor.coladd = 0; in ins_bs()
4036 if (curwin->w_cursor.col == 0) in ins_bs()
4039 if (curwin->w_cursor.lnum == lnum in ins_bs()
4045 if (u_save((linenr_T)(curwin->w_cursor.lnum - 2), in ins_bs()
4046 (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL) in ins_bs()
4063 if ((State & REPLACE_FLAG) && curwin->w_cursor.lnum <= lnum) in ins_bs()
4070 || curwin->w_cursor.lnum > orig_line_count) in ins_bs()
4073 --curwin->w_cursor.lnum; in ins_bs()
4081 char_u *ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, in ins_bs()
4117 save_col = curwin->w_cursor.col; in ins_bs()
4119 curwin->w_cursor.col = save_col; in ins_bs()
4151 save_col = curwin->w_cursor.col; in ins_bs()
4153 if (curwin->w_cursor.col < save_col) in ins_bs()
4154 mincol = curwin->w_cursor.col; in ins_bs()
4155 curwin->w_cursor.col = save_col; in ins_bs()
4168 && curwin->w_cursor.col > 0 in ins_bs()
4183 getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); in ins_bs()
4186 getvcol(curwin, &curwin->w_cursor, NULL, NULL, &want_vcol); in ins_bs()
4214 if (curwin->w_cursor.lnum == Insstart_orig.lnum in ins_bs()
4215 && curwin->w_cursor.col < Insstart_orig.col) in ins_bs()
4216 Insstart_orig.col = curwin->w_cursor.col; in ins_bs()
4226 getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); in ins_bs()
4311 (curwin->w_cursor.col > mincol in ins_bs()
4313 || (curwin->w_cursor.lnum != Insstart_orig.lnum in ins_bs()
4314 || curwin->w_cursor.col != Insstart_orig.col) in ins_bs()
4324 if (curwin->w_cursor.col <= 1) in ins_bs()
4334 if (curwin->w_cursor.lnum == Insstart_orig.lnum in ins_bs()
4335 && curwin->w_cursor.col < Insstart_orig.col) in ins_bs()
4336 Insstart_orig.col = curwin->w_cursor.col; in ins_bs()
4471 start_arrow(&curwin->w_cursor); in ins_tabline()
4494 tpos = curwin->w_cursor; in ins_scroll()
4510 tpos = curwin->w_cursor; in ins_horscroll()
4532 tpos = curwin->w_cursor; in ins_left()
4547 if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol) in ins_left()
4557 else if (vim_strchr(p_ww, '[') != NULL && curwin->w_cursor.lnum > 1) in ins_left()
4561 --(curwin->w_cursor.lnum); in ins_left()
4580 tpos = curwin->w_cursor; in ins_home()
4582 curwin->w_cursor.lnum = 1; in ins_home()
4583 curwin->w_cursor.col = 0; in ins_home()
4584 curwin->w_cursor.coladd = 0; in ins_home()
4599 tpos = curwin->w_cursor; in ins_end()
4601 curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count; in ins_end()
4617 if (curwin->w_cursor.lnum > 1 || curwin->w_cursor.col > 0) in ins_s_left()
4619 start_arrow_with_change(&curwin->w_cursor, end_change); in ins_s_left()
4642 start_arrow_with_change(&curwin->w_cursor, end_change); in ins_right()
4651 curwin->w_cursor.col += (*mb_ptr2len)(ml_get_cursor()); in ins_right()
4653 ++curwin->w_cursor.col; in ins_right()
4665 && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) in ins_right()
4667 start_arrow(&curwin->w_cursor); in ins_right()
4669 ++curwin->w_cursor.lnum; in ins_right()
4670 curwin->w_cursor.col = 0; in ins_right()
4686 if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count in ins_s_right()
4689 start_arrow_with_change(&curwin->w_cursor, end_change); in ins_s_right()
4711 tpos = curwin->w_cursor; in ins_up()
4743 start_arrow(&curwin->w_cursor); in ins_pageup()
4749 tpos = curwin->w_cursor; in ins_pageup()
4772 tpos = curwin->w_cursor; in ins_down()
4804 start_arrow(&curwin->w_cursor); in ins_pagedown()
4810 tpos = curwin->w_cursor; in ins_pagedown()
4841 if (Insstart_blank_vcol == MAXCOL && curwin->w_cursor.lnum == Insstart.lnum) in ins_tab()
4950 pos = curwin->w_cursor; in ins_tab()
4960 cursor = &curwin->w_cursor; in ins_tab()
4968 fpos = curwin->w_cursor; in ins_tab()
5133 if (virtual_active() && curwin->w_cursor.coladd > 0) in ins_eol()
5140 curwin->w_cursor.col += (colnr_T)STRLEN(ml_get_cursor()); in ins_eol()
5307 c = ins_copychar(curwin->w_cursor.lnum + (c == Ctrl_Y ? -1 : 1)); in ins_ctrl_ey()
5343 || curwin->w_cursor.lnum > curwin->w_buffer->b_ml.ml_line_count) in get_nolist_virtcol()
5346 return getvcol_nolist(&curwin->w_cursor); in get_nolist_virtcol()
5430 u_save(curwin->w_cursor.lnum, (linenr_T)(curwin->w_cursor.lnum + 1)); in ins_apply_autocmds()