Cell canvas renderer with frame cache and a perceptual 256-colour quantizer; responsive geometry (large/medium/small/too-small); squarified treemap with nested previews, LOD grouping, category colouring and adaptive labels; spatial arrow navigation with stable NodeID selection; zoom and breadcrumbs; modal system (info, help, confirm, save); list, file-type, top-N, scan-info, duplicate and comparison views; live search/filter; mouse support; move-to-trash.
15 lines
390 B
Go
15 lines
390 B
Go
package scan
|
|
|
|
import "runtime/debug"
|
|
|
|
// OnPanic is called if a scanner goroutine panics. The default re-panics
|
|
// (crashing the process); the TUI replaces it so it can restore the terminal
|
|
// before reporting. Programmer bugs are never silently swallowed.
|
|
var OnPanic = func(v any, stack []byte) { panic(v) }
|
|
|
|
func guard() {
|
|
if v := recover(); v != nil {
|
|
OnPanic(v, debug.Stack())
|
|
}
|
|
}
|