Skip to content
Myr

Retain preview window on resize after 'preview' action

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 dd886d2 · Browse files · 1 file+3 added−1 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+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:src/terminal.go+3 added-1 removed
291 unmodified lines
292 lastAction actionType293 lastFocus int32294 areaLines int295 areaColumns int296 forcePreview bool297}298299type selectedItem struct {300 at time.Time
953 unmodified lines
1254 return screenWidth, screenHeight, marginInt, paddingInt1255}12561257func (t *Terminal) resizeWindows(forcePreview bool) {1258 t.forcePreview = forcePreview1259 screenWidth, screenHeight, marginInt, paddingInt := t.adjustMarginAndPadding()1260 width := screenWidth - marginInt[1] - marginInt[3]1261 height := screenHeight - marginInt[0] - marginInt[2]1262
1054 unmodified lines
2317 return strbuf.String(), l2318}23192320func (t *Terminal) printAll() {2319 t.resizeWindows(false)2321 t.resizeWindows(t.forcePreview)2322 t.printList()2323 t.printPrompt()2324 t.printInfo()2325 t.printHeader()
1874 unmodified lines