selectedLine

returns a chunk expression describing the line or lines in the text selection.

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

the selectedLine

# Examples

the selectedLine

select the selectedLine

# Description

Use the selectedLine function to determine which line the selection or text insertion point is in.

A line is defined as a string that's delimited by return characters. A line in a narrow field may wrap around several times, and look like more than one line on screen, but it is still considered a single line.

If there is no insertion point or text selection, the selectedLine function returns empty.

To get a chunk expression describing the location of the selection, use the selectedChunk function. To get the selected lines in a list field that allows contiguous selections, use the hilitedLine property.

# Tags

ui,

# See

- **keyword:** selection, line, lines - **property:** selected, hilitedLine - **function:** selectedLoc, selectedChunk, mouseLine - **glossary:** property, insertion point, list field, contiguous, return, chunk expression - **control structure:** function