Skip to main content
1-Visitor
February 5, 2019
Question

Need an API that allows selecting over tag borders without turning balanced selections off

  • February 5, 2019
  • 0 replies
  • 1337 views

We require an API that allows us to select over tag borders without turning balanced selections off.

We have to do that be cause we want to be able to select text in tags partially.

 

Here is an example:


<x>a <b>c d</b>e</x>

We like to be able to select "a" and "c", or "d" and "e" without automatically selecting "c" and "d" together.

Currently our code looks like this:


set balancedselections=off
scroll_to_oid(oid);
goto_oid(oid, offset);
CharRightExtend; repeat selLen;

Maybe it's feasible to introduce some kind of function that allows to extend right without balancing the tag selection.


scroll_to_oid(oid);
goto_oid(oid, offset);
CharRightExtendUnBalanced; repeat selLen;

Is this something that you could consider for an upcoming release?