Method XbpMLE():queryMarked() Foundation

Determines the position of the first and last characters selected.

Syntax
:queryMarked() --> aStartEnd
Return

This method returns an array containing two elements with numeric values. The first element is the position within the edit buffer of the start of the selected text. The second element is the position of the end of the selected text. If no characters are marked, the array contains the current cursor position in both elements.

Description

The method :queryMarked() is used to determine whether any characters in the edit window are marked as selected. If text is selected, this method can also be used to determine how many characters are selected and their position in the edit buffer of the XbpMLE object.

The second element of the returned array corresponds always with the position of the cursor in the edit buffer. Note that the value of the second array element is smaller than the value of the first element if characters are marked by pressing the keys Shift+Left Arrow, for example. In this case, the user has marked text in the edit buffer from the right to the left, and the position of the first marked character in the edit buffer is greater than the position of the last marked character.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.