summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-03-04 11:15:26 +0800
committereltrac <hi@eltr.ac>2026-03-04 11:15:26 +0800
commit4d2843cbdc04098fef4141179f00fdacdb63bcc4 (patch)
treeabe2989057c428e7c24c75e3b7c29c3d4244b708
parenta5da7777274a108caaa7e360d4986a0457ea8239 (diff)
fix: invisible table head line
-rw-r--r--model_list.go2
-rw-r--r--view.go4
2 files changed, 2 insertions, 4 deletions
diff --git a/model_list.go b/model_list.go
index f2c6a72..12f2238 100644
--- a/model_list.go
+++ b/model_list.go
@@ -32,6 +32,8 @@ func listModel(arg string) model {
println("No drafts found.")
os.Exit(1)
}
+ // remove the table head row
+ records = records[1:]
return model{
choices: records,
diff --git a/view.go b/view.go
index 61716e5..4ee430e 100644
--- a/view.go
+++ b/view.go
@@ -11,10 +11,6 @@ func (m model) View() tea.View {
s := "Unpublished drafts of this Hugo site:\n\n"
for i, choice := range m.choices {
- if i == 0 {
- continue
- }
-
cursor := " " // no cursor
if m.cursor == i {
cursor = ">"