File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -137,8 +137,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
137137 m .submitted = true
138138 return m , tea .Quit
139139 case key .Matches (msg , km .OpenInEditor ):
140- //nolint: gosec
141- return m , createTempFile (m .textarea .Value (), uint (m .textarea .Line ())+ 1 )
140+ return m , createTempFile (m .textarea .Value (), m .textarea .Line ()+ 1 )
142141 }
143142 }
144143
@@ -149,15 +148,15 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
149148
150149type startEditorMsg struct {
151150 path string
152- lineno uint
151+ lineno int
153152}
154153
155154type editorFinishedMsg struct {
156155 content string
157156 err error
158157}
159158
160- func createTempFile (content string , lineno uint ) tea.Cmd {
159+ func createTempFile (content string , lineno int ) tea.Cmd {
161160 return func () tea.Msg {
162161 f , err := os .CreateTemp ("" , "gum.*.md" )
163162 if err != nil {
@@ -175,7 +174,7 @@ func createTempFile(content string, lineno uint) tea.Cmd {
175174 }
176175}
177176
178- func openEditor (path string , lineno uint ) tea.Cmd {
177+ func openEditor (path string , lineno int ) tea.Cmd {
179178 cb := func (err error ) tea.Msg {
180179 if err != nil {
181180 return editorFinishedMsg {
You can’t perform that action at this time.
0 commit comments