Lines Matching +defs:start +defs:col

300 				&& saved_cursor.col >= (colnr_T)(p - oldline))
301 saved_cursor.col += ind_len - (colnr_T)(p - oldline);
307 curwin->w_cursor.col = ind_len;
411 curwin->w_cursor.col = ind_len;
424 colnr_T col;
440 pos.col = regmatch.endpos[0].col;
450 getvcol(curwin, &pos, &col, NULL, NULL);
451 return (int)col;
496 * file, otherwise we just start replacing the next line.
585 * might be replaced at the start of the next line (due to autoindent
590 p = saved_line + curwin->w_cursor.col;
600 saved_line[curwin->w_cursor.col] = NUL;
610 p_extra = saved_line + curwin->w_cursor.col;
720 * with the line containing the start of
723 curwin->w_cursor.col = (colnr_T)(p - ptr);
762 curwin->w_cursor.col = (colnr_T)(p - ptr);
855 * If the comment leader has the start, middle or end flag, it may not
871 * Doing "O" on a start of comment does not insert leader.
879 /* find start of middle part */
923 * Doing "o" on a start of comment inserts the middle leader.
934 * If we have hit RETURN immediately after the start
940 && (int)curwin->w_cursor.col == lead_len)
953 * start (for C-comments).
1241 * indent to align with the line containing the start of the
1252 curwin->w_cursor.col = (colnr_T)(comment_end - saved_line);
1382 less_cols -= curwin->w_cursor.col;
1384 ai_col = curwin->w_cursor.col;
1391 for (n = 0; n < (int)curwin->w_cursor.col; ++n)
1393 newcol += curwin->w_cursor.col;
1417 saved_line[curwin->w_cursor.col] = NUL;
1425 changed_lines(curwin->w_cursor.lnum, curwin->w_cursor.col,
1432 curwin->w_cursor.col + less_cols_off,
1436 changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
1448 curwin->w_cursor.col = newcol;
1524 curwin->w_cursor.col = 0;
1582 * put string at start of string.
1729 long col;
1735 col = win_linetabsize(wp, s, (colnr_T)MAXCOL);
1742 col += 1;
1750 if (col <= width)
1752 col -= width;
1754 return (col + (width - 1)) / width + 1;
1759 * used from the start of the line to the given column number.
1767 long col;
1788 col = 0;
1791 col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL);
1797 * INSERT mode, then col must be adjusted so that it represents the last
1803 col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL) - 1;
1813 if (col > width)
1814 lines += (col - width) / (width + win_col_off2(wp)) + 1;
1936 colnr_T col;
1946 col = curwin->w_cursor.col;
1991 while (oldp[col + oldlen] != NUL && vcol < new_vcol)
1993 vcol += chartabsize(oldp + col + oldlen, vcol);
1996 if (vcol > new_vcol && oldp[col + oldlen] == TAB)
1999 oldlen += (*mb_ptr2len)(oldp + col + oldlen);
2011 if (oldp[col] != NUL)
2015 oldlen = (*mb_ptr2len)(oldp + col);
2031 i += replace_push_mb(oldp + col + i) - 1;
2034 replace_push(oldp[col + i]);
2043 if (col > 0)
2044 mch_memmove(newp, oldp, (size_t)col);
2047 p = newp + col;
2048 mch_memmove(p + newlen, oldp + col + oldlen,
2049 (size_t)(linelen - col - oldlen));
2068 changed_bytes(lnum, col);
2091 curwin->w_cursor.col += charlen;
2093 ++curwin->w_cursor.col;
2113 colnr_T col;
2121 col = curwin->w_cursor.col;
2128 if (col > 0)
2129 mch_memmove(newp, oldp, (size_t)col);
2130 mch_memmove(newp + col, s, (size_t)newlen);
2131 mch_memmove(newp + col + newlen, oldp + col, (size_t)(oldlen - col + 1));
2133 changed_bytes(lnum, col);
2134 curwin->w_cursor.col += newlen;
2151 /* Make sure the cursor is at the start of a character. */
2202 colnr_T col = curwin->w_cursor.col;
2213 if (col >= oldlen)
2220 && utfc_ptr2len(oldp + col) >= count)
2225 (void)utfc_ptr2char(oldp + col, cc);
2229 n = col;
2232 col = n;
2235 } while (UTF_COMPOSINGLIKE(oldp + col, oldp + n));
2244 movelen = (long)oldlen - (long)col - count + 1; /* includes trailing NUL */
2252 if (col > 0 && fixpos && restart_edit == 0
2258 --curwin->w_cursor.col;
2264 curwin->w_cursor.col -=
2265 (*mb_head_off)(oldp, oldp + curwin->w_cursor.col);
2268 count = oldlen - col;
2292 mch_memmove(newp, oldp, (size_t)col);
2294 mch_memmove(newp + col, oldp + col + count, (size_t)movelen);
2299 changed_bytes(lnum, curwin->w_cursor.col);
2316 colnr_T col = curwin->w_cursor.col;
2318 if (col == 0)
2321 newp = vim_strnsave(ml_get(lnum), col);
2329 changed_bytes(lnum, curwin->w_cursor.col);
2334 if (fixpos && curwin->w_cursor.col > 0)
2335 --curwin->w_cursor.col;
2374 curwin->w_cursor.col = 0;
2413 + curwin->w_cursor.col) = c;
2427 colnr_T col;
2429 for (col = 0, ptr = ml_get_curline(); vim_iswhite(*ptr); ++col)
2431 if (col >= curwin->w_cursor.col + extra)
2525 static void changed_common __ARGS((linenr_T lnum, colnr_T col, linenr_T lnume, long xtra));
2535 changed_bytes(lnum, col)
2537 colnr_T col;
2540 changed_common(lnum, col, lnum + 1, 0L);
2649 changed_lines(lnum, col, lnume, xtra)
2651 colnr_T col; /* column in first line with change */
2678 changed_common(lnum, col, lnume, xtra);
2720 changed_common(lnum, col, lnume, xtra)
2722 colnr_T col;
2744 curbuf->b_last_change.col = col;
2766 add = (p->col + cols < col || col + cols < p->col);
2850 else if (wp->w_cursor.lnum == lnum && wp->w_cursor.col >= col)
2972 change_warning(col)
2973 int col; /* column for message; non-zero when in insert
2998 msg_col = col;
3559 * expand "~" at the start.
3596 char_u *startstr; /* start again after this (can be NULL) */
3604 int at_start = TRUE; /* at start of a name */
3835 * Recognize the start of a new name, for '~'.
4781 * Find the start of a comment, not knowing if we are in a comment right now.
4800 * Check if the comment start we found is inside a string.
4804 for (p = line; *p && (colnr_T)(p - line) < pos->col; ++p)
4806 if ((colnr_T)(p - line) <= pos->col)
4850 else if (p[0] == '"') /* start of string */
4917 static int cin_is_cpp_baseclass __ARGS((colnr_T *col));
4918 static int get_baseclass_amount __ARGS((int col, int ind_maxparen, int ind_maxcomment, int ind_cpp_baseclass));
4924 static int find_last_paren __ARGS((char_u *l, int start, int end));
4998 pos.col = (int)(p - line);
5063 * If we're in a comment now, skip to the start of the comment.
5065 curwin->w_cursor.col = 0;
5084 return TRUE; /* label at start of file??? */
5228 colnr_T col;
5236 fp.col = (colnr_T)(p - l);
5238 getvcol(curwin, &fp, &col, NULL, NULL);
5239 return (int)col;
5294 colnr_T col;
5325 fp.col = (colnr_T)(p - line);
5326 getvcol(curwin, &fp, &col, NULL, NULL);
5327 return (int)col;
5345 colnr_T col;
5374 fp.col = (colnr_T)(s - line);
5375 getvcol(curwin, &fp, &col, NULL, NULL);
5376 return (int)col;
5395 * start and return the line in "*pp".
5427 * Recognize the start of a C or C++ comment.
5437 * Recognize the start of a "//" comment.
5487 * "lnum" is where we start looking.
5594 curwin->w_cursor.col = 0;
5599 ++curwin->w_cursor.col;
5644 curwin->w_cursor.col = i;
5690 cin_is_cpp_baseclass(col)
5691 colnr_T *col; /* return: column to align with */
5698 *col = 0;
5710 * '{' or '}' and start below it. This handles the following situations:
5768 /* we have something found, that looks like the start of
5772 *col = 0;
5813 else if (*col == 0)
5820 *col = (colnr_T)(s - line);
5825 *col = 0;
5835 get_baseclass_amount(col, ind_maxparen, ind_maxcomment, ind_cpp_baseclass)
5836 int col;
5845 if (col == 0)
5857 curwin->w_cursor.col = col;
5910 while (*p && (colnr_T)(p - line) < trypos->col)
5924 * Find the '{' at the start of the block we are in.
5949 if ((colnr_T)cin_skip2pos(trypos) == trypos->col
5976 if ((colnr_T)cin_skip2pos(trypos) > trypos->col)
6010 * Set w_cursor.col to the column number of the last unmatched ')' or '{' in
6014 find_last_paren(l, start, end)
6016 int start, end;
6022 curwin->w_cursor.col = 0; /* default is start of line */
6028 if (l[i] == start)
6036 curwin->w_cursor.col = i;
6174 * indent a closing parentheses under the line start of the matching
6229 colnr_T col;
6235 char_u *start;
6238 #define BRACE_AT_START 2 /* '{' is at start of line */
6365 && curwin->w_cursor.col < (colnr_T)STRLEN(linecopy)
6366 && linecopy[curwin->w_cursor.col] == ')')
6367 linecopy[curwin->w_cursor.col] = NUL;
6371 /* move the cursor to the start of the line */
6373 curwin->w_cursor.col = 0;
6403 getvcol(curwin, trypos, &col, NULL, NULL);
6404 amount = col;
6408 * If we're inside a comment and not looking at the start of the
6416 char_u lead_start[COM_MAX_LEN]; /* start-comment string */
6425 getvcol(curwin, trypos, &col, NULL, NULL);
6426 amount = col;
6472 /* If the start comment string matches in the previous
6485 /* If the start comment string doesn't match with the
6486 * start of the comment, skip this entry. XXX */
6487 else if (STRNCMP(ml_get(trypos->lnum) + trypos->col,
6546 start = ml_get(trypos->lnum);
6547 look = start + trypos->col + 2; /* skip / and * */
6549 trypos->col = (colnr_T)(skipwhite(look) - start);
6551 getvcol(curwin, trypos, &col, NULL, NULL);
6552 amount = col;
6573 : trypos->col < tryposBrace->col)
6587 /* Line up with the start of the matching paren line. */
6615 && trypos->col == our_paren_pos.col)
6653 curwin->w_cursor.col = look_col + 1;
6657 && trypos->col < our_paren_pos.col)
6658 ignore_paren_col = trypos->col + 1;
6686 for (col = 0; col < our_paren_pos.col; ++col)
6688 switch (l[col])
6701 our_paren_pos.col = 0;
6705 our_paren_pos.col++;
6708 col = our_paren_pos.col + 1;
6709 while (vim_iswhite(l[col]))
6710 col++;
6711 if (l[col] != NUL) /* In case of trailing space */
6712 our_paren_pos.col = col;
6714 our_paren_pos.col++;
6722 if (our_paren_pos.col > 0)
6724 getvcol(curwin, &our_paren_pos, &col, NULL, NULL);
6725 if (cur_amount > (int)col)
6726 cur_amount = col;
6732 /* Line up with the start of the matching paren line. */
6744 col = our_paren_pos.col;
6745 while ((int)our_paren_pos.col > ignore_paren_col)
6747 --our_paren_pos.col;
6751 col = our_paren_pos.col;
6754 col = MAXCOL;
6761 if (col == MAXCOL)
6766 curwin->w_cursor.col = col;
6799 start = ml_get(ourscope);
6803 * If the brace was at the start of the line, we use that;
6807 look = skipwhite(start);
6810 getvcol(curwin, trypos, &col, NULL, NULL);
6811 amount = col;
6812 if (*start == '{')
6821 * line. if so, find the start of the line.
6827 * matching it will take us back to the start of the line.
6830 if (find_last_paren(start, '(', ')')
6936 amount += ind_level; /* ind_level from start of block */
6953 curwin->w_cursor.col = 0;
6956 * If we went all the way back to the start of our scope, line
6989 * If we're in a comment now, skip to the start of the
6996 curwin->w_cursor.col = 0;
7044 * will take us back to the start of the line.
7057 curwin->w_cursor.col = 0;
7090 * If we're in a comment now, skip to the start of the comment.
7095 curwin->w_cursor.col = 0;
7221 curwin->w_cursor.col = 0;
7248 * Are we at the start of a cpp base class declaration or
7254 n = cin_is_cpp_baseclass(&col);
7268 /* Need to find start of the declaration. */
7275 amount = get_baseclass_amount(col, ind_maxparen,
7315 * matching it will take us back to the start of the line.
7343 curwin->w_cursor.col = 0;
7363 curwin->w_cursor.col = 0;
7389 * doesn't start with a '{', which must have a match
7681 * that matching it will take us back to the start of
7704 curwin->w_cursor.col = 0;
7757 * If we're at the end of a block, skip to the start of
7760 curwin->w_cursor.col = 0;
7772 curwin->w_cursor.col = 0;
7801 * prevailing indent and make sure it looks like the start
7838 curwin->w_cursor.col = 0;
7843 * If we're in a comment now, skip to the start of the comment.
7848 curwin->w_cursor.col = 0;
7853 * Are we at the start of a cpp base class declaration or
7859 n = cin_is_cpp_baseclass(&col);
7865 amount = get_baseclass_amount(col, ind_maxparen,
7913 curwin->w_cursor.col = 0;
7981 * matching it will take us back to the start of the line.
8052 curwin->w_cursor.col = 0;
8057 curwin->w_cursor.col = 0;
8230 colnr_T col;
8239 curwin->w_cursor.col = 0;
8307 curwin->w_cursor.col = pos->col;
8308 col = pos->col;
8317 while (*that && col)
8320 col--;
8835 /* Remove backslashes between "wildoff" and the start of the wildcard
9136 /* Remove backslashes between "wildoff" and the start of the wildcard
9518 /* we start at the end of the path */
9626 char_u *s; /* start */
9790 * found file names and start all over again.