Skip to content

Commit

Permalink
more cleanup from core changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Jul 10, 2024
1 parent 170de4f commit 3041c9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code/spellpanel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions code/symbolspanel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
})
}
Expand All @@ -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)
}
Expand Down

0 comments on commit 3041c9a

Please sign in to comment.