Lines Matching refs:w_cursor
121 if ((startcol = curwin->w_cursor.col) == 0) in internal_format()
126 wantcol = curwin->w_cursor.col; in internal_format()
128 curwin->w_cursor.col = startcol; in internal_format()
136 || curwin->w_cursor.lnum != Insstart.lnum in internal_format()
137 || curwin->w_cursor.col >= Insstart.col) in internal_format()
139 if (curwin->w_cursor.col == startcol && c != NUL) in internal_format()
146 end_col = curwin->w_cursor.col; in internal_format()
150 while (curwin->w_cursor.col > 0 && WHITECHAR(cc)) in internal_format()
160 if (curwin->w_cursor.col == 0 && WHITECHAR(cc)) in internal_format()
169 if (curwin->w_cursor.col < leader_len) in internal_format()
174 if (curwin->w_cursor.col == 0) in internal_format()
177 if (curwin->w_cursor.col <= leader_len) in internal_format()
179 col = curwin->w_cursor.col; in internal_format()
185 curwin->w_cursor.col = col; in internal_format()
191 foundcol = curwin->w_cursor.col; in internal_format()
192 if (curwin->w_cursor.col <= (colnr_T)wantcol) in internal_format()
201 if (curwin->w_cursor.col != startcol) in internal_format()
204 if (curwin->w_cursor.col < leader_len) in internal_format()
206 col = curwin->w_cursor.col; in internal_format()
215 if (curwin->w_cursor.col != skip_pos && allow_break) in internal_format()
217 foundcol = curwin->w_cursor.col; in internal_format()
219 if (curwin->w_cursor.col <= (colnr_T)wantcol) in internal_format()
222 curwin->w_cursor.col = col; in internal_format()
225 if (curwin->w_cursor.col == 0) in internal_format()
229 col = curwin->w_cursor.col; in internal_format()
237 if (curwin->w_cursor.col < leader_len) in internal_format()
240 curwin->w_cursor.col = col; in internal_format()
241 skip_pos = curwin->w_cursor.col; in internal_format()
250 foundcol = curwin->w_cursor.col; in internal_format()
253 if (curwin->w_cursor.col <= (colnr_T)wantcol) in internal_format()
263 if (curwin->w_cursor.col == startcol) in internal_format()
273 col = curwin->w_cursor.col; in internal_format()
289 ncc == NUL? 0 : curwin->w_cursor.col; in internal_format()
292 curwin->w_cursor.col = col; in internal_format()
296 if (curwin->w_cursor.col == 0) in internal_format()
303 curwin->w_cursor.col = startcol; in internal_format()
320 curwin->w_cursor.col = foundcol; in internal_format()
322 && (!fo_white_par || curwin->w_cursor.col < startcol)) in internal_format()
324 startcol -= curwin->w_cursor.col; in internal_format()
333 curwin->w_cursor.col = orig_col; in internal_format()
346 curwin->w_cursor.col = foundcol; in internal_format()
371 get_number_indent(curwin->w_cursor.lnum - 1); in internal_format()
412 curwin->w_cursor.col += startcol; in internal_format()
414 if (curwin->w_cursor.col > len) in internal_format()
415 curwin->w_cursor.col = len; in internal_format()
634 pos = curwin->w_cursor; in auto_format()
650 if (!WHITECHAR(cc) && curwin->w_cursor.col > 0 in auto_format()
656 curwin->w_cursor = pos; in auto_format()
659 curwin->w_cursor = pos; in auto_format()
671 if (prev_line && !paragraph_start(curwin->w_cursor.lnum)) in auto_format()
673 --curwin->w_cursor.lnum; in auto_format()
682 curwin->w_cursor = saved_cursor; in auto_format()
685 if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count) in auto_format()
688 curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count; in auto_format()
702 if (curwin->w_cursor.col == len) in auto_format()
707 ml_replace(curwin->w_cursor.lnum, pnew, FALSE); in auto_format()
811 curwin->w_cursor = oap->cursor_start; in op_format()
816 curwin->w_cursor = oap->start; in op_format()
836 if (oap->end_adjusted && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) in op_format()
837 ++curwin->w_cursor.lnum; in op_format()
844 curbuf->b_op_end = curwin->w_cursor; in op_format()
848 curwin->w_cursor = saved_cursor; in op_format()
970 if (curwin->w_cursor.lnum > 1) in format_lines()
971 is_not_par = fmt_check_par(curwin->w_cursor.lnum - 1 in format_lines()
975 next_is_not_par = fmt_check_par(curwin->w_cursor.lnum in format_lines()
979 is_end_par = !ends_in_white(curwin->w_cursor.lnum - 1); in format_lines()
981 curwin->w_cursor.lnum--; in format_lines()
987 curwin->w_cursor.lnum++; in format_lines()
995 if (count == 1 || curwin->w_cursor.lnum == curbuf->b_ml.ml_line_count) in format_lines()
1003 next_is_not_par = fmt_check_par(curwin->w_cursor.lnum + 1 in format_lines()
1007 (get_number_indent(curwin->w_cursor.lnum + 1) > 0); in format_lines()
1012 is_end_par = !ends_in_white(curwin->w_cursor.lnum); in format_lines()
1027 && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) in format_lines()
1029 if (do_second_indent && !LINEEMPTY(curwin->w_cursor.lnum + 1)) in format_lines()
1035 get_indent_lnum(curwin->w_cursor.lnum + 1); in format_lines()
1049 get_number_indent(curwin->w_cursor.lnum); in format_lines()
1055 get_number_indent(curwin->w_cursor.lnum); in format_lines()
1062 if (curwin->w_cursor.lnum >= curbuf->b_ml.ml_line_count in format_lines()
1063 || !same_leader(curwin->w_cursor.lnum, in format_lines()
1103 while (curwin->w_cursor.col && vim_isspace(gchar_cursor())) in format_lines()
1136 curwin->w_cursor.lnum++; in format_lines()
1137 curwin->w_cursor.col = 0; in format_lines()
1143 mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L, in format_lines()
1153 mark_col_adjust(curwin->w_cursor.lnum, in format_lines()
1157 curwin->w_cursor.lnum--; in format_lines()