Add status bar
This commit is contained in:
@ -241,11 +241,6 @@ func (t *TextEdit) insertNewLine() {
|
||||
t.prevCurCol = t.curx
|
||||
}
|
||||
|
||||
// GetLineCol returns (line, col) of the cursor. Zero is origin for both.
|
||||
func (t *TextEdit) GetLineCol() (int, int) {
|
||||
return t.cury, t.curx
|
||||
}
|
||||
|
||||
// getTabCountInLineAtCol returns tabs in the given line, at or before that column position,
|
||||
// if hard tabs are enabled. If hard tabs are not enabled, the function returns zero.
|
||||
// Multiply returned tab count by TabSize to get the offset produced by tabs.
|
||||
@ -280,6 +275,11 @@ func (t *TextEdit) clampLineCol(line, col int) (int, int) {
|
||||
return line, col
|
||||
}
|
||||
|
||||
// GetLineCol returns (line, col) of the cursor. Zero is origin for both.
|
||||
func (t *TextEdit) GetLineCol() (int, int) {
|
||||
return t.cury, t.curx
|
||||
}
|
||||
|
||||
// SetLineCol sets the cursor line and column position. Zero is origin for both.
|
||||
// If `line` is out of bounds, `line` will be clamped to the closest available line.
|
||||
// If `col` is out of bounds, `col` will be clamped to the closest column available for the line.
|
||||
|
Reference in New Issue
Block a user