MCPcopy Create free account
hub / github.com/codechenx/FastTableViewer / getColumnMaxWidth

Function getColumnMaxWidth

utils.go:229–239  ·  view source on GitHub ↗

getColumnMaxWidth determines the maximum width for a column

(colIndex int)

Source from the content-addressed store, hash-verified

227
228// getColumnMaxWidth determines the maximum width for a column
229func getColumnMaxWidth(colIndex int) int {
230 // Default wrap width (50 characters for long columns)
231 defaultWidth := 50
232
233 // Check if custom width is set
234 if width, exists := wrappedColumns[colIndex]; exists {
235 return width
236 }
237
238 return defaultWidth
239}
240
241// detectAndWrapLongColumns automatically enables wrapping for columns with long content
242// Analyzes first N rows to detect if columns have text longer than threshold

Callers 5

detectAndWrapLongColumnsFunction · 0.85
drawUIFunction · 0.85

Calls

no outgoing calls

Tested by 3