mirror of
https://github.com/daylinmorgan/tsm.git
synced 2024-12-22 05:00:44 -06:00
refactor: more readable syntax
This commit is contained in:
parent
1a510de961
commit
ad5dccfda1
1 changed files with 4 additions and 1 deletions
|
@ -150,7 +150,10 @@ proc addProjectCount(b: var Buffer) =
|
||||||
maxNumProjects = state.buffer.height - state.buffer.inputPad
|
maxNumProjects = state.buffer.height - state.buffer.inputPad
|
||||||
numProjects = state.projects.len
|
numProjects = state.projects.len
|
||||||
# TODO: use variables here for readability
|
# TODO: use variables here for readability
|
||||||
b.addLine $(fmt"[[{state.projectIdx+1}-{state.projectIdx + min(maxNumProjects, numProjects)}/{numProjects}]".bb("faint"))
|
let
|
||||||
|
low= state.projectIdx+1
|
||||||
|
high = state.projectIdx + min(maxNumProjects, numProjects)
|
||||||
|
b.addLine $(fmt"[[{low}-{high}/{numProjects}]".bb("faint"))
|
||||||
|
|
||||||
proc addProjects(b: var Buffer) =
|
proc addProjects(b: var Buffer) =
|
||||||
let
|
let
|
||||||
|
|
Loading…
Reference in a new issue