Skip to content

Commit

Permalink
feat(picker): apply margin to all lines of an entry
Browse files Browse the repository at this point in the history
  • Loading branch information
kiike authored and alexfikl committed Apr 15, 2024
1 parent 696f38e commit cb124c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions papis/tui/widgets/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ def get_line_prefix(
< self.options_headers_linecount[self.current_index]):
return [("class:options_list.selected_margin", "|")]
else:
marked_clines = [self.index_to_line(i) for i in self.marks]
if line in marked_clines:
marked_lines = []
for index in self.marks:
start_line = self.index_to_line(index)
end_line = start_line + self.options_headers_linecount[index]
marked_lines.extend([line for line in range(start_line, end_line)])
if line in marked_lines:
return [("class:options_list.marked_margin", "#")]
else:
return [("class:options_list.unselected_margin", " ")]
Expand Down

0 comments on commit cb124c3

Please sign in to comment.