I have a problem with the behavior of Replace_Block
Firstly I create the following string
12345 abcde
Now with the cursor on "1" of that string I apply any of the the following command strings
bb(cp) c(5) be(cp) eol rb("2","b",bb,be)
or
bb(cp) c(5) be(cp) c(-3) rb("2","b",bb,be)
or
bb(cp) c(5) be(cp) c(-2) rb("2","b",bb,be)
or
bb(cp) c(5) be(cp) c(-1) rb("2","b",bb,be)
I get the rror message "cannot find 2"
But if I do one of the two following commands
bb(cp) c(5) be(cp) bol rb("2","b",bb,be)
or
bb(cp) c(5) be(cp) c(-4) rb("2","b",bb,be)
I can successfully modify the string 12345 to become 1b345
So rb will only work if the cursor sits before that part of the bb-be string which contains the search string
I see why this may be so.... Replace_Block is a subset of Replace and that command only searches forward unless REVERSE is specified)
However the command gp(bb) and db(bb,be) will work when the cursor is forward of the block bb,be so I would have thought RB would work similarly
An even more confusing related problem is the following
say I have a string
abc 23 abc
with the cursor on "2"
the I execute the commands
bb(cp) c(2) be(cp) c(-2) rb("23","2a3a",bb,be) db(bb.be)
which results in the following string
abc 2a abc
|
|