diff --git a/code/spellpanel.go b/code/spellpanel.go index c02500a4..fe38694e 100644 --- a/code/spellpanel.go +++ b/code/spellpanel.go @@ -140,7 +140,7 @@ func (sv *SpellPanel) Init() { if tv == nil || tv.Buffer == nil { return } - tv.QReplaceStart(sv.UnkWord, sv.ChangeText().Txt, false) + tv.QReplaceStart(sv.UnkWord, sv.ChangeText().Text(), false) tv.QReplaceReplaceAll(0) sv.LastAction = w sv.Errs = tv.Buffer.AdjustedTagsImpl(sv.Errs, sv.CurLn) // update tags diff --git a/code/symbolspanel.go b/code/symbolspanel.go index a7c0ca8d..07fd4fbc 100644 --- a/code/symbolspanel.go +++ b/code/symbolspanel.go @@ -161,8 +161,9 @@ func (sv *SymbolsPanel) makeToolbar(p *tree.Plan) { w.OnChange(func(e events.Event) { sv.Match = w.Text() sv.UpdateSymbols() - w.CursorEnd() - w.SetFocusEvent() + // TODO: why do this? + // w.CursorEnd() + // w.SetFocusEvent() }) }) } @@ -176,9 +177,8 @@ func (sv *SymbolsPanel) RefreshAction() { func SelectSymbol(cv *Code, ssym syms.Symbol) { tv := cv.ActiveTextEditor() if tv == nil || tv.Buffer == nil || string(tv.Buffer.Filename) != ssym.Filename { - var ok = false tr := textbuf.NewRegion(ssym.SelectReg.St.Ln, ssym.SelectReg.St.Ch, ssym.SelectReg.Ed.Ln, ssym.SelectReg.Ed.Ch) - tv, ok = cv.OpenFileAtRegion(core.Filename(ssym.Filename), tr) + _, ok := cv.OpenFileAtRegion(core.Filename(ssym.Filename), tr) if !ok { log.Printf("Code SelectSymbol: OpenFileAtRegion returned false: %v\n", ssym.Filename) }