Linemarks

Linemarks are indicators on specific lines in a text edit control and are normally used as go-to points. You can assign style and color attributes to any of the 32 text editor linemarks, numbered zero (0) through 31, which you can assign in any combination to each text editor line. (See also the JadeTextEdit class setLinemarkAttributes method.)

Linemarks are displayed in the selection margin at the left of text in a line. If the selection margin is hidden, the background color of the whole line is changed instead. Linemarks numbered 25 through 31 are used by the text folding feature and are bound to margin 2 by default. You should not use the line folding linemarks in this range for other purposes.

The remaining linemark numbers in the range zero (0) through 24 are bound to margin 1 and have no predefined function, so you can use them as bookmarks for indicating syntax errors or breakpoints, for example.

You can bind editor commands to key combinations, which allow a linemark to be toggled on the current line (for example, Ctrl+F7), move the caret to the next line with a specified linemark (for example, F7), or move the caret to the previous line with a specified linemark (for example, Shift+F7). Note that when the caret moves to a linemark on a line that is hidden in a contracted fold block, that fold block and any embedded fold blocks are expanded to show that line.

Each linemark number can have a different symbol, foreground color, and background color. If a line has more than one linemark set on it, they are drawn in order on top of each other, starting with zero (0). If low numbers are set to large symbols, they are partially visible when over-drawn by smaller symbols assigned to higher linemark numbers. If the linemark margin (1) is not visible and lines have linemarks set on them, each of those lines is displayed with the background color overridden with the background color of the highest linemark set on that line. A linemark with the type SC_MARK_BACKGROUND (22) is always displayed this way, even when the linemark margin is visible.

Linemarks are also known as bookmarks in other languages; for example, in Microsoft Visual Studio.