mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-10-06 12:00:43 +03:00
396dbf68b1
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16053 3c298f89-4303-0410-b956-a3cf2f4a3e73
23 lines
641 B
Diff
23 lines
641 B
Diff
--- a/editors/vi.c
|
|
+++ b/editors/vi.c
|
|
@@ -3317,7 +3317,7 @@ static void do_cmd(char c)
|
|
buf[1] = '\0';
|
|
q = get_input_line(buf); // get input line- use "status line"
|
|
if (q[0] && !q[1]) {
|
|
- if (last_search_pattern[0])
|
|
+ if (last_search_pattern)
|
|
last_search_pattern[0] = c;
|
|
goto dc3; // if no pat re-use old pat
|
|
}
|
|
@@ -3333,6 +3333,10 @@ static void do_cmd(char c)
|
|
if (cmdcnt-- > 1) {
|
|
do_cmd(c);
|
|
} // repeat cnt
|
|
+ if (last_search_pattern == 0) {
|
|
+ msg = "No previous regular expression";
|
|
+ goto dc2;
|
|
+ }
|
|
dir = BACK; // assume BACKWARD search
|
|
p = dot - 1;
|
|
if (last_search_pattern[0] == '?') {
|