If busybox is compiled with FEATURE_VI_REGEX_SEARCH enabled, command ":s/x/y/" searches not only in the current line, but continues search after it. This makes range searches (":1,3s/x/y/") work incorrect. For example file "./test" : 1 2 3 $vi ./test :1,2s/3/e/ gives us : 1 2 e This error affects versions at least since 1.23, simple patches for 1.27.2 and 1.29.3 attached, I can check other versions, if necessary. Patches must be applied to "editors/vi.c"
1920a1921,1922 > if (range == LIMITED) > q = next_line(p); // range is to prev line
1912a1913,1914 > if (range == LIMITED) > q = next_line(p); // range is to next line
_______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox