Lines Matching refs:w_cursor
340 pos_T save_cursor = curwin->w_cursor; in get_sw_value_pos()
343 curwin->w_cursor = *pos; in get_sw_value_pos()
345 curwin->w_cursor = save_cursor; in get_sw_value_pos()
355 pos_T pos = curwin->w_cursor; in get_sw_value_indent()
770 if (!(flags & SIN_UNDO) || u_savesub(curwin->w_cursor.lnum) == OK) in set_indent()
776 ml_replace(curwin->w_cursor.lnum, newline, FALSE); in set_indent()
778 changed_bytes(curwin->w_cursor.lnum, 0); in set_indent()
781 if (saved_cursor.lnum == curwin->w_cursor.lnum) in set_indent()
799 adjust_prop_columns(curwin->w_cursor.lnum, in set_indent()
808 curwin->w_cursor.col = ind_len; in set_indent()
1012 if (col >= curwin->w_cursor.col + extra) in inindent()
1030 linenr_T start_lnum = curwin->w_cursor.lnum; in op_reindent()
1066 first_changed = curwin->w_cursor.lnum; in op_reindent()
1067 last_changed = curwin->w_cursor.lnum; in op_reindent()
1070 ++curwin->w_cursor.lnum; in op_reindent()
1071 curwin->w_cursor.col = 0; // make sure it's valid in op_reindent()
1075 curwin->w_cursor.lnum = start_lnum; in op_reindent()
1145 old_pos = curwin->w_cursor; in ins_try_si()
1156 curwin->w_cursor.lnum = pos->lnum; in ins_try_si()
1157 curwin->w_cursor.col = i; in ins_try_si()
1159 curwin->w_cursor = *pos; in ins_try_si()
1161 curwin->w_cursor = old_pos; in ins_try_si()
1167 else if (curwin->w_cursor.col > 0) in ins_try_si()
1172 if (c == '{' && can_si_back && curwin->w_cursor.lnum > 1) in ins_try_si()
1174 old_pos = curwin->w_cursor; in ins_try_si()
1176 while (curwin->w_cursor.lnum > 1) in ins_try_si()
1178 ptr = skipwhite(ml_get(--(curwin->w_cursor.lnum))); in ins_try_si()
1186 curwin->w_cursor = old_pos; in ins_try_si()
1194 if (curwin->w_cursor.col > 0 && can_si && c == '#') in ins_try_si()
1202 if (ai_col > curwin->w_cursor.col) in ins_try_si()
1203 ai_col = curwin->w_cursor.col; in ins_try_si()
1239 orig_col = curwin->w_cursor.col; in change_indent()
1245 vc = getvcol_nolist(&curwin->w_cursor); in change_indent()
1251 start_col = curwin->w_cursor.col; in change_indent()
1254 new_cursor_col = curwin->w_cursor.col; in change_indent()
1256 new_cursor_col -= curwin->w_cursor.col; in change_indent()
1258 insstart_less = curwin->w_cursor.col; in change_indent()
1281 insstart_less -= curwin->w_cursor.col; in change_indent()
1296 new_cursor_col += curwin->w_cursor.col; in change_indent()
1299 new_cursor_col = curwin->w_cursor.col; in change_indent()
1325 curwin->w_cursor.col = (colnr_T)new_cursor_col; in change_indent()
1347 curwin->w_cursor.col = 0; in change_indent()
1349 curwin->w_cursor.col = (colnr_T)new_cursor_col; in change_indent()
1356 if (curwin->w_cursor.lnum == Insstart.lnum && Insstart.col != 0) in change_indent()
1376 while (start_col > (int)curwin->w_cursor.col) in change_indent()
1381 while (start_col < (int)curwin->w_cursor.col || replaced) in change_indent()
1409 new_line[curwin->w_cursor.col] = NUL; in change_indent()
1412 ml_replace(curwin->w_cursor.lnum, orig_line, FALSE); in change_indent()
1413 curwin->w_cursor.col = orig_col; in change_indent()
1563 ml_replace(curwin->w_cursor.lnum, line, FALSE); in copy_indent()
1566 curwin->w_cursor.col = ind_len; in copy_indent()
1811 save_pos = curwin->w_cursor; in get_expr_indent()
1814 set_vim_var_nr(VV_LNUM, curwin->w_cursor.lnum); in get_expr_indent()
1837 curwin->w_cursor = save_pos; in get_expr_indent()
1907 realpos = curwin->w_cursor; in get_lisp_indent()
1908 curwin->w_cursor.col = 0; in get_lisp_indent()
1926 while (--curwin->w_cursor.lnum >= pos->lnum) in get_lisp_indent()
1928 if (linewhite(curwin->w_cursor.lnum)) in get_lisp_indent()
1975 curwin->w_cursor.lnum = pos->lnum; in get_lisp_indent()
1976 curwin->w_cursor.col = pos->col; in get_lisp_indent()
2071 curwin->w_cursor = realpos; in get_lisp_indent()
2093 if (linewhite(curwin->w_cursor.lnum)) in fixthisline()
2149 pos = curwin->w_cursor; in f_lispindent()
2153 curwin->w_cursor.lnum = lnum; in f_lispindent()
2155 curwin->w_cursor = pos; in f_lispindent()