[package] busybox: update to v1.12.4 (partially closes: #4279)
[openwrt/svn-archive/archive.git] / package / busybox / patches / 480-vi_search.patch
1 --- a/editors/vi.c
2 +++ b/editors/vi.c
3 @@ -3317,7 +3317,7 @@ static void do_cmd(char c)
4 buf[1] = '\0';
5 q = get_input_line(buf); // get input line- use "status line"
6 if (q[0] && !q[1]) {
7 - if (last_search_pattern[0])
8 + if (last_search_pattern)
9 last_search_pattern[0] = c;
10 goto dc3; // if no pat re-use old pat
11 }
12 @@ -3333,6 +3333,10 @@ static void do_cmd(char c)
13 if (cmdcnt-- > 1) {
14 do_cmd(c);
15 } // repeat cnt
16 + if (last_search_pattern == 0) {
17 + msg = "No previous regular expression";
18 + goto dc2;
19 + }
20 dir = BACK; // assume BACKWARD search
21 p = dot - 1;
22 if (last_search_pattern[0] == '?') {