GetTerCursorPos
Retrieve the current cursor position.
bool GetTerCursorPos( out CurLine, ref CurCol)
int CurLine; | The int variable where the current line number or the current absolute cursor position is returned |
int CurCol; | The integer variable where the current column number is returned. |
Description: This function returns the current cursor position. The cursor position can be retrieved as the absolute position or in terms of the line number and column number.To get the absolute cursor position, set the CurCol variable to -1 before calling this function. The absolute position (base 0) is returned in the CurLine variable.
Example:int CurCol=-1;int CurLine;
GetTerCursorPos(out CurLine,ref CurCol); | returns absolute position in the CurLine variable. |
To get the line (base 0) and column (base 0) position of the cursor, set the CurCol variable to a value other than -1 before calling this function.
int CurCol=0;
int CurLine;
GetTerCursorPos(out CurLine,ref CurCol); | The current line number is returned in the CurLine variable, the current column is returned in the CurCol variable. |
Return Value: This function returns true when successful.