mirror of
https://github.com/daylinmorgan/tsm.git
synced 2024-12-22 05:00:44 -06:00
fix: don't extend beyond necessary max height
This commit is contained in:
parent
863391ce3c
commit
090dda23ad
1 changed files with 5 additions and 1 deletions
|
@ -179,7 +179,11 @@ proc draw() =
|
||||||
|
|
||||||
proc update(s: var State) =
|
proc update(s: var State) =
|
||||||
s.buffer.width = terminalWidth()
|
s.buffer.width = terminalWidth()
|
||||||
s.buffer.height = min(terminalHeight(), maxHeight + state.buffer.inputPad)
|
s.buffer.height = min([
|
||||||
|
terminalHeight(),
|
||||||
|
maxHeight + state.buffer.inputPad,
|
||||||
|
state.buffer.inputPad + state.projects.len
|
||||||
|
])
|
||||||
s.cursor.max = s.buffer.height - state.buffer.inputPad
|
s.cursor.max = s.buffer.height - state.buffer.inputPad
|
||||||
|
|
||||||
proc clear(b: var Buffer) =
|
proc clear(b: var Buffer) =
|
||||||
|
|
Loading…
Reference in a new issue