Skip to content

Commit

Permalink
[status-] BaseSheet.selectedStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw authored and anjakefala committed Nov 11, 2024
1 parent 7e7702a commit 396d248
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions visidata/statusbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,14 @@ def modifiedStatus(sheet):

@BaseSheet.property
def selectedStatus(sheet):
if hasattr(sheet, 'nSelectedRows') and sheet.nSelectedRows:
return f' [:selected_row][:onclick dup-selected]{sheet.options.disp_selected_note}{sheet.nSelectedRows}[/][/] '
else:
return ''
return ''


@Sheet.property
def selectedStatus(sheet):
if sheet.nSelectedRows:
return f' [:selected_row][:onclick dup-selected]{sheet.options.disp_selected_note}{sheet.nSelectedRows}[/][/] '

@VisiData.api
def drawRightStatus(vd, scr, vs):
'Draw right side of status bar. Return length displayed.'
Expand Down

0 comments on commit 396d248

Please sign in to comment.