Skip to content
Myr

Adjust comments + move some code around

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

authored by Christian Rocha · committed by Christian Rocha · parent ae9ea29 · Browse files · 1 file+14 added−12 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+14 added−12 removed

  • other:+14 added−12 removed

1 file+14 added−12 removed

modified:tea.go+14 added-12 removed
174 unmodified lines
175 close(done)176 return nil177 }178179 // Report resizes to the renderer. This only matters if we're doing180 // higher performance scroll-based rendering.179 // Process batch commands180 if batchedCmds, ok := msg.(batchMsg); ok {181 for _, cmd := range batchedCmds {182 cmds <- cmd183 }184 continue185 }186187 // Report resizes to the renderer. Only necessary for special,188 // performance-based rendering.189 if size, ok := msg.(WindowSizeMsg); ok {190 mrRenderer.width = size.width191 mrRenderer.height = size.height192 }193186 // Handle messages telling the renderer to ignore ranges of lines194 // Handle messages telling the main rendering routine to ignore195 // ranges of lines. Useful for performance-based rendering.196 if ignore, ok := msg.(IgnoreLinesMsg); ok {197 mrRenderer.setIgnoredLines(ignore.from, ignore.to)198 }199191 // Handle messages telling the renderer to stop ignoring lines200 // Handle messages telling the main rendering to stop ignoring201 // lines. Useful when disabling any performance-based rendering.202 if _, ok := msg.(IgnoreLinesMsg); ok {203 mrRenderer.clearIgnoredLines()204 }205196 // Process batch commands197 if batchedCmds, ok := msg.(batchMsg); ok {198 for _, cmd := range batchedCmds {199 cmds <- cmd200 }201 continue202 }203206 model, cmd = p.update(msg, model) // run update207 cmds <- cmd // process command (if any)208 mrRenderer.write(p.view(model)) // send view to renderer209 }
14 unmodified lines