balance.dcl 286 Bytes
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1 2 3 4 5 6 7
definition module balance

from EdText import Text,LineNr,Selection,Position,ColumnNr

//	Text_Balance returns the Selection of the smallest piece of balanced text surrounding
//	the cursor or the current selection.
Text_Balance :: !LineNr !Int !LineNr !Int !Text -> (!Bool,!Selection)