Retrieves the index of the line that contains the specified character index (the serial position). A character index is the zero-based index of the character from the beginning of the entire text. You can use this inline function or explicitly send the EE_LINE_FROM_CHAR message.
Editor_LineFromChar( HWND hwnd, int nLogical, UINT nSerialIndex );
Specifies the window handle of the view or frame of EmEditor.
Specify one of the following values.
Value Meaning POS_VIEW Display Coordinates POS_LOGICAL_A Logical Coordinates (Count double-byte characters as two) POS_LOGICAL_W Logical Coordinates (Count double-byte characters as one)
Specifies the character index of the character contained in the line whose number is to be retrieved. If this parameter is -1, EE_LINE_FROM_CHAR retrieves the line number of the current line (the line containing the cursor).
The return value is the zero-based line number of the line containing the character index specified by nSerialIndex.
Send feedback on this topic to Emurasoft