Lines Matching refs:ptr
1459 char_u *ptr, in find_is_eval_item() argument
1465 if ((*ptr == ']' && dir == BACKWARD) || (*ptr == '[' && dir == FORWARD)) in find_is_eval_item()
1469 if ((*ptr == '[' && dir == BACKWARD) || (*ptr == ']' && dir == FORWARD)) in find_is_eval_item()
1475 if (*ptr == '.') in find_is_eval_item()
1479 if (ptr[dir == BACKWARD ? 0 : 1] == '>' in find_is_eval_item()
1480 && ptr[dir == BACKWARD ? -1 : 0] == '-') in find_is_eval_item()
1529 char_u *ptr; in find_ident_at_pos() local
1541 ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); in find_ident_at_pos()
1550 while (ptr[col] != NUL) in find_ident_at_pos()
1553 if ((find_type & FIND_EVAL) && ptr[col] == ']') in find_ident_at_pos()
1555 this_class = mb_get_class(ptr + col); in find_ident_at_pos()
1558 col += (*mb_ptr2len)(ptr + col); in find_ident_at_pos()
1562 while (ptr[col] != NUL in find_ident_at_pos()
1563 && (i == 0 ? !vim_iswordc(ptr[col]) : VIM_ISWHITE(ptr[col])) in find_ident_at_pos()
1564 && (!(find_type & FIND_EVAL) || ptr[col] != ']') in find_ident_at_pos()
1569 bn = ptr[col] == ']'; in find_ident_at_pos()
1577 if ((find_type & FIND_EVAL) && ptr[col] == ']') in find_ident_at_pos()
1580 this_class = mb_get_class(ptr + col); in find_ident_at_pos()
1583 prevcol = col - 1 - (*mb_head_off)(ptr, ptr + col - 1); in find_ident_at_pos()
1584 prev_class = mb_get_class(ptr + prevcol); in find_ident_at_pos()
1591 || !find_is_eval_item(ptr + prevcol, &prevcol, in find_ident_at_pos()
1609 ? vim_iswordc(ptr[col - 1]) in find_ident_at_pos()
1610 : (!VIM_ISWHITE(ptr[col - 1]) in find_ident_at_pos()
1612 || !vim_iswordc(ptr[col - 1])))) in find_ident_at_pos()
1615 && find_is_eval_item(ptr + col - 1, &col, in find_ident_at_pos()
1622 if (!(find_type & FIND_STRING) || vim_iswordc(ptr[col])) in find_ident_at_pos()
1627 if (ptr[col] == NUL || (i == 0 in find_ident_at_pos()
1628 && (has_mbyte ? this_class != 2 : !vim_iswordc(ptr[col])))) in find_ident_at_pos()
1640 ptr += col; in find_ident_at_pos()
1641 *text = ptr; in find_ident_at_pos()
1654 this_class = mb_get_class(ptr); in find_ident_at_pos()
1655 while (ptr[col] != NUL in find_ident_at_pos()
1656 && ((i == 0 ? mb_get_class(ptr + col) == this_class in find_ident_at_pos()
1657 : mb_get_class(ptr + col) != 0) in find_ident_at_pos()
1660 && find_is_eval_item(ptr + col, &col, &bn, FORWARD)) in find_ident_at_pos()
1662 col += (*mb_ptr2len)(ptr + col); in find_ident_at_pos()
1665 while ((i == 0 ? vim_iswordc(ptr[col]) in find_ident_at_pos()
1666 : (ptr[col] != NUL && !VIM_ISWHITE(ptr[col]))) in find_ident_at_pos()
1669 && find_is_eval_item(ptr + col, &col, &bn, FORWARD)) in find_ident_at_pos()
2304 char_u *ptr; in nv_gd() local
2306 if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0 in nv_gd()
2307 || find_decl(ptr, len, nchar == 'd', thisblock, SEARCH_START) in nv_gd()
2379 char_u *ptr, in find_decl() argument
2402 sprintf((char *)pat, vim_iswordp(ptr) ? "\\V\\<%.*s\\>" : "\\V%.*s", in find_decl()
2403 len, ptr); in find_decl()
3200 char_u *ptr = NULL; in nv_zet() local
3205 if (VIsual_active && get_visual_text(cap, &ptr, &len) in nv_zet()
3208 if (ptr == NULL) in nv_zet()
3219 ptr = ml_get_pos(&curwin->w_cursor); in nv_zet()
3223 if (ptr == NULL && (len = find_ident_under_cursor(&ptr, in nv_zet()
3226 spell_add_word(ptr, len, nchar == 'w' || nchar == 'W' in nv_zet()
3597 char_u *ptr = NULL; in nv_ident() local
3632 if (VIsual_active && get_visual_text(cap, &ptr, &n) == FAIL) in nv_ident()
3638 if (ptr == NULL && (n = find_ident_under_cursor(&ptr, in nv_ident()
3652 if (kp_help && *skipwhite(ptr) == NUL) in nv_ident()
3675 curwin->w_cursor.col = (colnr_T) (ptr - ml_get_curline()); in nv_ident()
3677 if (!g_cmd && vim_iswordp(ptr)) in nv_ident()
3698 while (*ptr == '-' && n > 0) in nv_ident()
3700 ++ptr; in nv_ident()
3761 ptr = vim_strnsave(ptr, n); in nv_ident()
3764 p = vim_strsave_fnameescape(ptr, VSE_NONE); in nv_ident()
3767 p = vim_strsave_shellescape(ptr, TRUE, TRUE); in nv_ident()
3768 vim_free(ptr); in nv_ident()
3806 if (vim_strchr(aux_ptr, *ptr) != NULL) in nv_ident()
3813 int len = (*mb_ptr2len)(ptr) - 1; in nv_ident()
3816 *p++ = *ptr++; in nv_ident()
3818 *p++ = *ptr++; in nv_ident()
3829 ? vim_iswordp(mb_prevptr(ml_get_curline(), ptr)) in nv_ident()
3830 : vim_iswordc(ptr[-1]))) in nv_ident()
4258 char_u *ptr; in nv_gotofile() local
4277 ptr = grab_file_name(cap->count1, &lnum); in nv_gotofile()
4279 if (ptr != NULL) in nv_gotofile()
4285 if (do_ecmd(0, ptr, NULL, NULL, ECMD_LAST, in nv_gotofile()
4293 vim_free(ptr); in nv_gotofile()
4528 char_u *ptr; in nv_brackets() local
4531 if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0) in nv_brackets()
4535 find_pattern_in_path(ptr, 0, len, TRUE, in nv_brackets()
4965 char_u *ptr; in nv_replace() local
5032 ptr = ml_get_cursor(); in nv_replace()
5033 if (STRLEN(ptr) < (unsigned)cap->count1 in nv_replace()
5034 || (has_mbyte && mb_charlen(ptr) < cap->count1)) in nv_replace()
5133 ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE); in nv_replace()
5135 ptr[curwin->w_cursor.col] = c; in nv_replace()
5139 ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE); in nv_replace()
5140 ptr[curwin->w_cursor.col] = cap->nchar; in nv_replace()
5154 &ptr[start], (int)cap->count1); in nv_replace()
5289 char_u *ptr; in n_swapchar() local
5325 ptr = ml_get(pos.lnum); in n_swapchar()
5326 count = (int)STRLEN(ptr) - pos.col; in n_swapchar()
5330 &ptr[pos.col], count); in n_swapchar()
5352 ptr = ml_get(pos.lnum); in n_swapchar()
5355 netbeans_inserted(curbuf, pos.lnum, pos.col, &ptr[pos.col], count); in n_swapchar()
6097 char_u *ptr = ml_get_curline(); in nv_g_cmd() local
6102 i = mb_string2cells(ptr, (int)STRLEN(ptr)); in nv_g_cmd()
6104 i = (int)STRLEN(ptr); in nv_g_cmd()
6124 char_u *ptr = ml_get_curline(); in nv_g_cmd() local
6127 if (curwin->w_cursor.col > 0 && ptr[curwin->w_cursor.col] == NUL) in nv_g_cmd()
6132 && VIM_ISWHITE(ptr[curwin->w_cursor.col])) in nv_g_cmd()