mirror of
https://github.com/ddworken/hishtory.git
synced 2025-01-11 16:58:47 +01:00
Remove extraneous new lines from TUI that make the UI jump around for invalid search atoms
This commit is contained in:
parent
db219f434b
commit
fe41687fd0
@ -1,6 +1,5 @@
|
||||
Warning: failed to search: search query contains unknown search atom 'ls' that doesn't match any column names
|
||||
|
||||
|
||||
Search Query: > ls:
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
|
@ -346,13 +346,14 @@ func (m model) View() string {
|
||||
}
|
||||
warning := ""
|
||||
if m.isOffline {
|
||||
warning += "Warning: failed to contact the hishtory backend (are you offline?), so some results may be stale\n\n"
|
||||
warning += "Warning: failed to contact the hishtory backend (are you offline?), so some results may be stale"
|
||||
}
|
||||
if m.searchErr != nil {
|
||||
warning += fmt.Sprintf("Warning: failed to search: %v\n\n", m.searchErr)
|
||||
warning += fmt.Sprintf("Warning: failed to search: %v", m.searchErr)
|
||||
}
|
||||
warning += "\n"
|
||||
helpView := m.help.View(keys)
|
||||
return fmt.Sprintf("\n%s\n%s%s\nSearch Query: %s\n\n%s\n", loadingMessage, warning, m.banner, m.queryInput.View(), baseStyle.Render(m.table.View())) + helpView
|
||||
return fmt.Sprintf("\n%s%s%s\nSearch Query: %s\n\n%s\n", loadingMessage, warning, m.banner, m.queryInput.View(), baseStyle.Render(m.table.View())) + helpView
|
||||
}
|
||||
|
||||
func getRows(ctx *context.Context, columnNames []string, query string, numEntries int) ([]table.Row, []*data.HistoryEntry, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user