Skip to content

Commit e983621

Browse files
committed
fix: write was not compiling
1 parent 29af117 commit e983621

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

write/write.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
138138
return m, tea.Quit
139139
case key.Matches(msg, km.OpenInEditor):
140140
//nolint: gosec
141-
return m, createTempFile(m.textarea.Value(), uint(m.textarea.Line())+1)
141+
return m, createTempFile(m.textarea.Value(), m.textarea.Line()+1)
142142
}
143143
}
144144

@@ -149,15 +149,15 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
149149

150150
type startEditorMsg struct {
151151
path string
152-
lineno uint
152+
lineno int
153153
}
154154

155155
type editorFinishedMsg struct {
156156
content string
157157
err error
158158
}
159159

160-
func createTempFile(content string, lineno uint) tea.Cmd {
160+
func createTempFile(content string, lineno int) tea.Cmd {
161161
return func() tea.Msg {
162162
f, err := os.CreateTemp("", "gum.*.md")
163163
if err != nil {
@@ -175,7 +175,7 @@ func createTempFile(content string, lineno uint) tea.Cmd {
175175
}
176176
}
177177

178-
func openEditor(path string, lineno uint) tea.Cmd {
178+
func openEditor(path string, lineno int) tea.Cmd {
179179
cb := func(err error) tea.Msg {
180180
if err != nil {
181181
return editorFinishedMsg{

0 commit comments

Comments
 (0)