0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

updated for version 7.0072

This commit is contained in:
Bram Moolenaar
2005-05-18 22:10:28 +00:00
parent d8a4e563d0
commit d9d305836e
7 changed files with 57 additions and 36 deletions

View File

@@ -3929,13 +3929,17 @@ nv_gd(oap, nchar)
int save_p_scs;
char_u *ptr;
if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0 ||
(pat = alloc(len + 5)) == NULL)
if ((len = find_ident_under_cursor(&ptr, FIND_IDENT)) == 0
|| (pat = alloc(len + 7)) == NULL)
{
clearopbeep(oap);
return;
}
sprintf((char *)pat, vim_iswordp(ptr) ? "\\<%.*s\\>" : "%.*s", len, ptr);
/* Put "\V" before the pattern to avoid that the special meaning of "."
* and "~" causes trouble. */
sprintf((char *)pat, vim_iswordp(ptr) ? "\\V\\<%.*s\\>" : "\\V%.*s",
len, ptr);
old_pos = curwin->w_cursor;
save_p_ws = p_ws;
save_p_scs = p_scs;