Skip to content
Myr

Fix regression: output printed on alternate screen

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 6b5886c · Browse files · 1 file+13 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+13 added−11 removed

  • other:+13 added−11 removed

1 file+13 added−11 removed

modified:src/terminal.go+13 added-11 removed
1341 unmodified lines
1342 }1343 }()1344 }13451346 exit := func(code int, printQuery bool) {1346 exit := func(getCode func() int) {1347 if !t.cleanExit && t.fullscreen && t.inlineInfo {1348 t.placeCursor()1349 }1350 t.tui.Close()1351 if printQuery {1352 t.printer(string(t.input))1353 }1351 code := getCode()1352 if code <= exitNoMatch && t.history != nil {1353 t.history.append(string(t.input))1354 }1355 // prof.Stop()
39 unmodified lines
1395 t.redraw()1396 case reqRedraw:1397 t.redraw()1398 case reqClose:1401 if t.output() {1402 exit(exitOk, false)1403 } else {1404 exit(exitNoMatch, false)1405 }1399 exit(func() int {1400 if t.output() {1401 return exitOk1402 }1403 return exitNoMatch1404 })1405 case reqPreviewDisplay:1406 t.previewer.text = value.(string)1407 t.previewer.lines = strings.Count(t.previewer.text, "\n")1408 t.previewer.offset = 01409 t.printPreview()1410 case reqPreviewRefresh:1411 t.printPreview()1412 case reqPrintQuery:1414 exit(exitOk, true)1413 exit(func() int {1414 t.printer(string(t.input))1415 return exitOk1416 })1417 case reqQuit:1416 exit(exitInterrupt, false)1418 exit(func() int { return exitInterrupt })1419 }1420 }1421 t.placeCursor()1422 t.mutex.Unlock()
424 unmodified lines