Fix vi-mode searching broken with the NetBSD changes update.
PR: bin/4064 Submitted by: Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
This commit is contained in:
parent
37f2e0347b
commit
db863ba00b
@ -464,8 +464,7 @@ cv_search(el, dir)
|
||||
(void)strncpy(tmpbuf, el->el_search.patbuf, sizeof(tmpbuf) - 1);
|
||||
el->el_search.patbuf[0] = '.';
|
||||
el->el_search.patbuf[1] = '*';
|
||||
(void)strncpy(&el->el_search.patbuf[2], tmpbuf,
|
||||
sizeof(el->el_search.patbuf) - 3);
|
||||
(void)strncpy(&el->el_search.patbuf[2], tmpbuf, EL_BUFSIZ - 3);
|
||||
el->el_search.patlen++;
|
||||
el->el_search.patbuf[el->el_search.patlen++] = '.';
|
||||
el->el_search.patbuf[el->el_search.patlen++] = '*';
|
||||
@ -479,8 +478,7 @@ cv_search(el, dir)
|
||||
tmpbuf[tmplen++] = '*';
|
||||
#endif
|
||||
tmpbuf[tmplen] = '\0';
|
||||
(void)strncpy(el->el_search.patbuf, tmpbuf,
|
||||
sizeof(el->el_search.patbuf) - 1);
|
||||
(void)strncpy(el->el_search.patbuf, tmpbuf, EL_BUFSIZ - 1);
|
||||
el->el_search.patlen = tmplen;
|
||||
}
|
||||
el->el_state.lastcmd = (el_action_t) dir; /* avoid c_setpat */
|
||||
|
Loading…
x
Reference in New Issue
Block a user