Documentation ¶
Index ¶
- Constants
- Variables
- type Buffer
- func (b *Buffer) AddSel(sel *util.Sel)
- func (b *Buffer) At(p int) rune
- func (b *Buffer) ByteOffset(p int) int
- func (buf *Buffer) BytesSize() (r BufferSize)
- func (b *Buffer) CanSave() bool
- func (buf *Buffer) DescribeUndo() string
- func (b *Buffer) FixSel(sel *util.Sel)
- func (b *Buffer) FlushUndo()
- func (b *Buffer) GetLine(i int, utf16col bool) (string, int, int)
- func (b *Buffer) HasRedo() bool
- func (b *Buffer) HasUndo() bool
- func (buf *Buffer) Highlight(start, end int) []uint8
- func (b *Buffer) IncGap(delta int)
- func (b *Buffer) IsDir() bool
- func (b *Buffer) LastEdit() time.Time
- func (b *Buffer) LastEditIsType(rev int) int
- func (b *Buffer) LastTypePos() int
- func (b *Buffer) MoveGap(p int)
- func (b *Buffer) Path() string
- func (b *Buffer) Put() error
- func (b *Buffer) Rdlock()
- func (b *Buffer) Rdunlock()
- func (b *Buffer) ReaderFrom(s, e int) io.RuneReader
- func (b *Buffer) Reload(flags ReloadFlag) error
- func (b *Buffer) Replace(text []rune, sel *util.Sel, solid bool, eventChan chan string, ...)
- func (buf *Buffer) ReplaceAll(stash []ReplaceOp, eventChan chan string, origin util.EventOrigin)
- func (b *Buffer) ReplaceFull(text []rune)
- func (b *Buffer) RmSel(sel *util.Sel)
- func (b *Buffer) Selection(sel util.Sel) ([]rune, []rune)
- func (b *Buffer) SelectionRunes(sel util.Sel) []rune
- func (b *Buffer) Sels() []*util.Sel
- func (b *Buffer) ShortName() string
- func (b *Buffer) Size() int
- func (b *Buffer) Tof(start int, dir int, f func(rune) bool) int
- func (b *Buffer) Tofp(start int, dir int) int
- func (b *Buffer) Tonl(start int, dir int) int
- func (b *Buffer) Topmatch(start int, dir int) int
- func (buf *Buffer) Toregend(start int) int
- func (b *Buffer) Tospc(start int, dir int, dontForceAdvance bool) int
- func (b *Buffer) Towd(start int, dir int, dontForceAdvance bool) int
- func (buf *Buffer) UTF16Pos(ln, col int) int
- func (b *Buffer) Undo(sel *util.Sel, redo bool)
- func (b *Buffer) UndoReset()
- func (b *Buffer) UndoWhere() int
- func (b *Buffer) UpdateWords()
- type BufferSize
- type ReloadFlag
- type ReplaceOp
Constants ¶
View Source
const CLOSED_PARENTHESIS = ")]}>"
View Source
const OPEN_PARENTHESIS = "([{<"
View Source
const SLOP = 128
Variables ¶
View Source
var TYPING_INTERVAL = time.Duration(2 * time.Second)
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct { Dir string Name string Editable bool EditableStart int Modified bool Props map[string]string Hl hl.Highlighter RevCount int Words []string WordsUpdate time.Time EditMark, EditMarkNext bool // used to implement shift+movement selection actions Markat int DumpCmd, DumpDir string // contains filtered or unexported fields }
func (*Buffer) ByteOffset ¶
func (*Buffer) BytesSize ¶
func (buf *Buffer) BytesSize() (r BufferSize)
func (*Buffer) DescribeUndo ¶
func (*Buffer) LastEditIsType ¶
func (*Buffer) LastTypePos ¶
func (*Buffer) ReaderFrom ¶
func (b *Buffer) ReaderFrom(s, e int) io.RuneReader
func (*Buffer) Replace ¶
func (b *Buffer) Replace(text []rune, sel *util.Sel, solid bool, eventChan chan string, origin util.EventOrigin)
Replaces text between sel.S and sel.E with text, updates sels AND sel accordingly After the replacement the highlighter is restarted
func (*Buffer) ReplaceAll ¶
func (buf *Buffer) ReplaceAll(stash []ReplaceOp, eventChan chan string, origin util.EventOrigin)
func (*Buffer) ReplaceFull ¶
func (*Buffer) Selection ¶
Returns the specified selection as two slices. The slices are to be treated as contiguous and may be empty
func (*Buffer) SelectionRunes ¶
Returns the specified selection as single slice of ColorRunes (will allocate)
func (*Buffer) Topmatch ¶
Moves to the matching parenthesis of the one at 'start' in the specified direction
func (*Buffer) UpdateWords ¶
func (b *Buffer) UpdateWords()
type BufferSize ¶
description of buffer size, for debugging purposes
type ReloadFlag ¶
type ReloadFlag uint8
const ( ReloadCreate ReloadFlag = 1 << iota ReloadPreserveCurlineWhitespace )
Click to show internal directories.
Click to hide internal directories.