tal: 426 bytes
Signed-off-by: Andrey Dobrovolsky
Signed-off-by: Ron Yorston
---
editors/vi.c | 105 +++
1 file changed, 97 insertions(+), 8 deletions(-)
diff --git a/editors/vi.c b/editors/vi.c
index 959362b25..eed51fbad 100644
--- a/editors/vi.c
++
lta
--
(add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0) Total: 0 bytes
Signed-off-by: Andrey Dobrovolsky
Signed-off-by: Ron Yorston
---
editors/vi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/edit
If busybox is compiled with ENABLE_FEATURE_VI_REGEX_SEARCH, :s command
must be REGEX compatible too, char-by-char search and replace is not applicable.
Added:
function do_subtitution()
couple of local variables in colon() function
Additional code and variables conditioned by
In order to perform backward search using re_search(), starting offset
must be set
to the end of the area searched, while "range" parameter is negative.
The returned value of re_search() is an offset of the pattern start
inside the area
searched, so char_search() can return area start adress plus
commit 87baae194e360e67865aeb3bc7a47da600607b04
Author: AndreyDobrovolskyOdessa
Date: Wed Feb 10 00:17:06 2021 +0200
Implementing :s command utilizing full REGEXes power
Additional code and variables conditioned by ENABLE_FEATURE_VI_REGEX_SEARCH.
Added:
function
commit 50c8bc4e25edac4d4b65419303df1a32db69ef28
Author: AndreyDobrovolskyOdessa
Date: Tue Feb 9 14:44:14 2021 +0200
Backward search repair for ENABLE_FEATURE_VI_REGEX_SEARCH.
In order to perform backward search using re_search(), starting
offset must be set
to the end of the area
Hi, busy people!
If busybox is built with CONFIG_FEATURE_VI_REGEX_SEARCH=y vi is unable to
search backward. Proposed patch for 1.31.1 is:
--- vi.c.old 2019-06-10 13:50:53.0 +0300
+++ vi.c 2020-02-15 15:22:24.851557863 +0200
@@ -2189,15 +2189,11 @@
// re_search() >= 0: index of found
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