mirror of
https://github.com/taigrr/teaqlite.git
synced 2026-04-02 04:59:03 -07:00
feat(tests): add comprehensive test suite, update deps and Go 1.26.1
- Add 20+ tests for utility functions, SharedData, and Model - Tests cover: LoadTables, LoadTableData, UpdateCell, pagination, table inference, focus/blur, empty database, invalid indices - Update Go to 1.26.1, upgrade all dependencies - Replace custom Min/Max with Go builtin min/max - Format all files with goimports - Add staticcheck to CI workflow
This commit is contained in:
@@ -418,7 +418,7 @@ func (m *QueryModel) View() string {
|
||||
content.WriteString("\n")
|
||||
|
||||
// Data rows with scrolling
|
||||
visibleCount := Max(1, m.Shared.Height-10)
|
||||
visibleCount := max(1, m.Shared.Height-10)
|
||||
startIdx := 0
|
||||
|
||||
// Adjust start index if selected row is out of view
|
||||
@@ -426,7 +426,7 @@ func (m *QueryModel) View() string {
|
||||
startIdx = m.selectedRow - visibleCount + 1
|
||||
}
|
||||
|
||||
endIdx := Min(len(m.results), startIdx+visibleCount)
|
||||
endIdx := min(len(m.results), startIdx+visibleCount)
|
||||
|
||||
for i := range endIdx {
|
||||
if i < startIdx {
|
||||
@@ -465,4 +465,3 @@ func (m *QueryModel) View() string {
|
||||
|
||||
return content.String()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user