@@ -103,7 +103,6 @@ local function create_marks_content(marks, search_query)
103103 filtered_names = mark_names
104104 end
105105
106- -- MINIMAL MODE: Show only order and filepath
107106 if config .minimal then
108107 if # filtered_names == 0 then
109108 table.insert (lines , " No marks" )
@@ -113,23 +112,34 @@ local function create_marks_content(marks, search_query)
113112 for i , name in ipairs (filtered_names ) do
114113 local mark = marks [name ]
115114 local filepath = get_relative_path_display (mark .file )
116- local line = string.format (" [%d] %s" , i , filepath )
115+ local line = string.format (" [%d] %s %s " , i , name , filepath )
117116 table.insert (lines , line )
118117
119118 local line_idx = # lines - 1
120119 mark_info [line_idx ] = { name = name , mark = mark , index = i }
121120
121+ local number_part = string.format (" [%d]" , i )
122+ local name_start = string.len (number_part ) + 1
123+ local name_end = name_start + string.len (name )
124+
122125 -- Highlight the number
123126 table.insert (highlights , {
124127 line = line_idx ,
125128 col = 0 ,
126- end_col = string.len (string.format ( " [%d] " , i ) ),
129+ end_col = string.len (number_part ),
127130 hl_group = " ProjectMarksNumber" ,
128131 })
132+ -- Highlight the name
133+ table.insert (highlights , {
134+ line = line_idx ,
135+ col = name_start ,
136+ end_col = name_end ,
137+ hl_group = " ProjectMarksName" ,
138+ })
129139 -- Highlight the filepath
130140 table.insert (highlights , {
131141 line = line_idx ,
132- col = string.len ( string.format ( " [%d] " , i )) ,
142+ col = name_end + 1 ,
133143 end_col = - 1 ,
134144 hl_group = " ProjectMarksFile" ,
135145 })
@@ -138,7 +148,6 @@ local function create_marks_content(marks, search_query)
138148 return lines , highlights , mark_info
139149 end
140150
141- -- NORMAL MODE: Full detailed view
142151 -- Header
143152 local title = search_query
144153 and search_query ~= " "
0 commit comments