Create and initialize Highlighter in TextEdit
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
type Buffer interface {
|
||||
// Line returns a slice of the data at the given line, including the ending line-
|
||||
// delimiter. line starts from zero. Data returned may or may not be a copy: do not
|
||||
// write it.
|
||||
// write to it.
|
||||
Line(line int) []byte
|
||||
|
||||
// Returns a slice of the buffer from startLine, startCol, to endLine, endCol,
|
||||
@@ -62,5 +62,10 @@ type Buffer interface {
|
||||
// the last rune before the line delimiter.
|
||||
ClampLineCol(line, col int) (int, int)
|
||||
|
||||
// PosToLineCol converts a byte offset (position) of the buffer's bytes, into
|
||||
// a line and column. Unless you are working with the Bytes() function, this
|
||||
// is unlikely to be useful to you. Position will be clamped.
|
||||
PosToLineCol(pos int) (int, int)
|
||||
|
||||
WriteTo(w io.Writer) (int64, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user