Skip to content

Commit 1bd4672

Browse files
committed
Stop using (*csvi.KeyEventArgs).YesNo to adapt hymkor/csvi v1.20.1
1 parent 583c17b commit 1bd4672

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spread/view.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ func (viewer *Viewer) edit(title string, validate func(*csvi.CellValidatedEvent)
9393
}
9494

9595
apply := func(app *csvi.KeyEventArgs) (*csvi.CommandResult, error) {
96-
if app.YesNo("Apply changes and quit ? [y/n] ") {
96+
ch, err := app.MessageAndGetKey("Apply changes and quit ? [y/n] ")
97+
if err == nil && (ch == "y" || ch == "Y") {
9798
io.WriteString(app, "y\n")
9899
applyChange = true
99100
return &csvi.CommandResult{Quit: true}, nil

0 commit comments

Comments
 (0)