Lines Matching refs:col
97 tabstop_padding(colnr_T col, int ts_arg, int *vts) in tabstop_padding() argument
106 return ts - (col % ts); in tabstop_padding()
113 if (tabcol > col) in tabstop_padding()
115 padding = (int)(tabcol - col); in tabstop_padding()
120 padding = vts[tabcount] - (int)((col - tabcol) % vts[tabcount]); in tabstop_padding()
129 tabstop_at(colnr_T col, int ts, int *vts) in tabstop_at() argument
143 if (tabcol > col) in tabstop_at()
159 tabstop_start(colnr_T col, int ts, int *vts) in tabstop_start() argument
167 return (col / ts) * ts; in tabstop_start()
173 if (tabcol > col) in tabstop_start()
178 return excess + ((col - excess) / vts[tabcount]) * vts[tabcount]; in tabstop_start()
357 pos.col = getwhitecols_curline(); in get_sw_value_indent()
365 get_sw_value_col(buf_T *buf, colnr_T col UNUSED) in get_sw_value_col()
369 tabstop_at(col, buf->b_p_ts, buf->b_p_vts_array); in get_sw_value_col()
783 if (saved_cursor.col >= old_offset) in set_indent()
786 saved_cursor.col += ind_len - old_offset; in set_indent()
787 else if (saved_cursor.col >= new_offset) in set_indent()
790 saved_cursor.col = new_offset; in set_indent()
808 curwin->w_cursor.col = ind_len; in set_indent()
820 colnr_T col; in get_number_indent() local
844 pos.col = (colnr_T)(*regmatch.endp - ml_get(lnum)); in get_number_indent()
852 getvcol(curwin, &pos, &col, NULL, NULL); in get_number_indent()
853 return (int)col; in get_number_indent()
1008 colnr_T col; in inindent() local
1010 for (col = 0, ptr = ml_get_curline(); VIM_ISWHITE(*ptr); ++col) in inindent()
1012 if (col >= curwin->w_cursor.col + extra) in inindent()
1071 curwin->w_cursor.col = 0; // make sure it's valid in op_reindent()
1152 i = pos->col; in ins_try_si()
1157 curwin->w_cursor.col = i; in ins_try_si()
1167 else if (curwin->w_cursor.col > 0) 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()
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()
1358 if ((int)Insstart.col <= insstart_less) in change_indent()
1359 Insstart.col = 0; in change_indent()
1361 Insstart.col -= insstart_less; 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()
1413 curwin->w_cursor.col = orig_col; in change_indent()
1566 curwin->w_cursor.col = ind_len; in copy_indent()
1581 long col; in ex_retab() local
1639 col = 0; in ex_retab()
1644 if (VIM_ISWHITE(ptr[col])) in ex_retab()
1650 start_col = col; in ex_retab()
1652 if (ptr[col] == ' ') in ex_retab()
1703 new_line = alloc(old_len - col + start_col + len + 1); in ex_retab()
1709 ptr + col, (size_t)(old_len - col + 1)); in ex_retab()
1711 for (col = 0; col < len; col++) in ex_retab()
1712 ptr[col] = (col < num_tabs) ? '\t' : ' '; in ex_retab()
1720 col = start_col + len; in ex_retab()
1726 if (ptr[col] == NUL) in ex_retab()
1728 vcol += chartabsize(ptr + col, (colnr_T)vcol); in ex_retab()
1730 col += (*mb_ptr2len)(ptr + col); in ex_retab()
1732 ++col; in ex_retab()
1899 colnr_T col; in get_lisp_indent() local
1908 curwin->w_cursor.col = 0; in get_lisp_indent()
1976 curwin->w_cursor.col = pos->col; in get_lisp_indent()
1977 col = pos->col; in get_lisp_indent()
1988 while (*that && col) in get_lisp_indent()
1991 col--; in get_lisp_indent()