mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-22 20:17:45 +03:00
Format matches count the same as scroll percent
This commit is contained in:
parent
35041e7709
commit
8b4fe494cf
@ -303,7 +303,8 @@ def draw_status_line(self):
|
||||
elif self.state is MESSAGE:
|
||||
self.write(self.message)
|
||||
else:
|
||||
scroll_frac = styled('{:.0%}'.format(self.scroll_pos / (self.max_scroll_pos or 1)), fg=self.opts.margin_fg)
|
||||
sp = '{:.0%}'.format(self.scroll_pos/self.max_scroll_pos) if self.scroll_pos and self.max_scroll_pos else '0%'
|
||||
scroll_frac = styled(sp, fg=self.opts.margin_fg)
|
||||
if self.current_search is None:
|
||||
counts = '{}{}{}'.format(
|
||||
styled(str(self.added_count), fg=self.opts.highlight_added_bg),
|
||||
@ -311,7 +312,7 @@ def draw_status_line(self):
|
||||
styled(str(self.removed_count), fg=self.opts.highlight_removed_bg)
|
||||
)
|
||||
else:
|
||||
counts = '[{} matches]'.format(len(self.current_search))
|
||||
counts = styled('{} matches'.format(len(self.current_search)), fg=self.opts.margin_fg)
|
||||
suffix = counts + ' ' + scroll_frac
|
||||
prefix = styled(':', fg=self.opts.margin_fg)
|
||||
filler = self.screen_size.cols - wcswidth(prefix) - wcswidth(suffix)
|
||||
|
Loading…
Reference in New Issue
Block a user