Deleting a range
Posted: Fri Oct 31, 2014 7:44 pm
Hi, in search query I put "delete lines" and I choosed Search for all terms, but nothing helped me.
My question is how can I delete more then one line following this steps:
Suppose a text:
reserved word(i)
text
text
text
reserved word(f)
I would like to select a range starting at reserved word(i) until reserved word(f) and delete all lines in this range.
I tryed this, but returned an error, could you help me, please?
My question is how can I delete more then one line following this steps:
Suppose a text:
reserved word(i)
text
text
text
reserved word(f)
I would like to select a range starting at reserved word(i) until reserved word(f) and delete all lines in this range.
I tryed this, but returned an error, could you help me, please?
Code: Select all
rve.SearchText('Inicia bloco', [rvseoDown, rvseoWholeWord]).ToInteger;
nPosI := RVGetLinearCaretPos(rve);
rve.SearchText('Termina bloco', [rvseoDown, rvseoWholeWord]).ToInteger;
nPosF := RVGetLinearCaretPos(rve);
rve.DeleteParas(nPosI, nPosF);
or
rve.SetSelectionBounds(nPosI, rve.GetOffsBeforeItem(nPosI), nPosF, rve.GetOffsAfterItem(nPosF));
rve.DeleteSelection;