Skip to content

Commit

Permalink
update to texteditor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Jul 14, 2024
1 parent b12f1a2 commit 9657835
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions code/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (cv *Code) JoinParaLines() { //types:add
if tv.HasSelection() {
tv.Buffer.JoinParaLines(tv.SelectRegion.Start.Ln, tv.SelectRegion.End.Ln)
} else {
tv.Buffer.JoinParaLines(0, tv.NLines-1)
tv.Buffer.JoinParaLines(0, tv.NumLines-1)

Check failure on line 253 in code/editor.go

View workflow job for this annotation

GitHub Actions / build

tv.NumLines undefined (type *TextEditor has no field or method NumLines)
}
}

Expand All @@ -264,7 +264,7 @@ func (cv *Code) TabsToSpaces() { //types:add
if tv.HasSelection() {
tv.Buffer.TabsToSpacesRegion(tv.SelectRegion.Start.Ln, tv.SelectRegion.End.Ln)
} else {
tv.Buffer.TabsToSpacesRegion(0, tv.NLines-1)
tv.Buffer.TabsToSpacesRegion(0, tv.NumLines-1)

Check failure on line 267 in code/editor.go

View workflow job for this annotation

GitHub Actions / build

tv.NumLines undefined (type *TextEditor has no field or method NumLines)
}
}

Expand All @@ -278,7 +278,7 @@ func (cv *Code) SpacesToTabs() { //types:add
if tv.HasSelection() {
tv.Buffer.SpacesToTabsRegion(tv.SelectRegion.Start.Ln, tv.SelectRegion.End.Ln)
} else {
tv.Buffer.SpacesToTabsRegion(0, tv.NLines-1)
tv.Buffer.SpacesToTabsRegion(0, tv.NumLines-1)

Check failure on line 281 in code/editor.go

View workflow job for this annotation

GitHub Actions / build

tv.NumLines undefined (type *TextEditor has no field or method NumLines)
}
}

Expand Down
2 changes: 1 addition & 1 deletion code/spellpanel.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (sv *SpellPanel) CheckNext() {
break
} else {
sv.CurLn++
if sv.CurLn >= tv.NLines {
if sv.CurLn >= tv.NumLines {

Check failure on line 221 in code/spellpanel.go

View workflow job for this annotation

GitHub Actions / build

tv.NumLines undefined (type *TextEditor has no field or method NumLines)
done = true
break
}
Expand Down
2 changes: 1 addition & 1 deletion mail/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (a *App) Compose() { //types:add
a.ComposeMessage.To = []*mail.Address{{}}
b := core.NewBody().AddTitle("Send message")
core.NewForm(b).SetStruct(a.ComposeMessage)
ed := texteditor.NewSoloEditor(b)
ed := texteditor.NewEditor(b)
ed.Buffer.SetLang("md")
ed.Buffer.Options.LineNumbers = false
ed.Styler(func(s *styles.Style) {
Expand Down
2 changes: 1 addition & 1 deletion numbers/databrowser/datatab.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (br *Browser) NewTabEditorString(label, content string) *texteditor.Editor
ed.Buffer.SetText([]byte(content))
return ed
}
ed := texteditor.NewSoloEditor(tab)
ed := texteditor.NewEditor(tab)
ed.Buffer.SetText([]byte(content))
br.Update()
return ed
Expand Down
2 changes: 1 addition & 1 deletion numbers/databrowser/filetree.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (br *Browser) NewTabEditor(label, filename string) *texteditor.Editor {
ed.Buffer.Open(core.Filename(filename))
return ed
}
ed := texteditor.NewSoloEditor(tab)
ed := texteditor.NewEditor(tab)
ed.Buffer.Open(core.Filename(filename))
br.Update()
return ed
Expand Down

0 comments on commit 9657835

Please sign in to comment.