MCPcopy
hub / github.com/ddworken/hishtory / isCompactHeightMode

Function isCompactHeightMode

client/tui/tui.go:450–460  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

448}
449
450func isCompactHeightMode(ctx context.Context) bool {
451 if hctx.GetConf(ctx).ForceCompactMode {
452 return true
453 }
454 _, height, err := getTerminalSize()
455 if err != nil {
456 hctx.GetLogger().Warnf("got err=%v when retrieving terminal dimensions, assuming the terminal is reasonably tall", err)
457 return false
458 }
459 return height < 25
460}
461
462func getBaseStyle(config hctx.ClientConfig) lipgloss.Style {
463 return lipgloss.NewStyle().

Callers 3

ViewMethod · 0.85
renderNullableTableFunction · 0.85
makeTableFunction · 0.85

Calls 3

GetConfFunction · 0.92
GetLoggerFunction · 0.92
getTerminalSizeFunction · 0.85

Tested by

no test coverage detected