MCPcopy Index your code
hub / github.com/micro-editor/micro / insertByte

Method insertByte

internal/buffer/line_array.go:227–231  ·  view source on GitHub ↗

InsertByte inserts a byte at a given location

(pos Loc, value byte)

Source from the content-addressed store, hash-verified

225
226// InsertByte inserts a byte at a given location
227func (la *LineArray) insertByte(pos Loc, value byte) {
228 la.lines[pos.Y].data = append(la.lines[pos.Y].data, 0)
229 copy(la.lines[pos.Y].data[pos.X+1:], la.lines[pos.Y].data[pos.X:])
230 la.lines[pos.Y].data[pos.X] = value
231}
232
233// joinLines joins the two lines a and b
234func (la *LineArray) joinLines(a, b int) {

Callers 1

insertMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected