func new_view(ctx view_context, buf *buffer) *view { v := new(view) v.ctx = ctx v.uibuf = tulib.NewBuffer(1, 1) v.attach(buf) v.ac_decide = default_ac_decide v.highlight_ranges = make([]byte_range, 0, 10) v.tags = make([]view_tag, 0, 10) return v }
func newView(ctx viewContext, buf *buffer.Buffer, redraw chan struct{}) *view { v := new(view) v.ctx = ctx v.uiBuf = tulib.NewBuffer(1, 1) v.attach(buf) v.highlightRanges = make([]byteRange, 0, 10) v.tags = make([]viewTag, 0, 10) v.redraw = redraw return v }
func NewView(ctx Context, buf *buffer.Buffer, redraw chan struct{}) *View { v := &View{ ctx: ctx, uiBuf: tulib.NewBuffer(1, 1), highlightRanges: make([]byteRange, 0, 10), tags: make([]Tag, 0, 10), redraw: redraw, showHighlights: true, } v.Attach(buf) return v }