Skip to content

Commit

Permalink
Merge pull request #2469 from saulpw/kef/guides-color
Browse files Browse the repository at this point in the history
[guides-] give guides the same background colour as sidebar
  • Loading branch information
anjakefala authored Jul 22, 2024
2 parents 556df9f + a9a1e87 commit 0e8056c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion visidata/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import re

from visidata import vd, BaseSheet, Sheet, ItemColumn, Column, VisiData, ENTER, RowColorizer, AttrDict, MissingAttrFormatter
from visidata import wraptext, Path
from visidata import wraptext, Path, CellColorizer

guides_list = '''
GuideIndex ("A Guide to VisiData Guides (you are here)")
Expand Down Expand Up @@ -160,6 +160,7 @@ class GuideSheet(Sheet):
ItemColumn('guide', 1, width=80, displayer='full'),
]
precious = False
colorizers = [CellColorizer(4, 'color_sidebar', lambda s,c,r,v: True)]

def iterload(self):
self.metadata = AttrDict(sheettype='Sheet')
Expand Down Expand Up @@ -220,6 +221,8 @@ def getCommandInfo(sheet, keys):
else:
vd.warning(f'no command bound to {keys} on {sheet}')

GuideSheet.options.color_current_row = "underline"

vd.addCommand('', 'show-command-info', 'status(getCommandInfo(inputKeys("get command for keystrokes: ")))', 'show longname and helpstring for keybinding')

vd.addMenuItems('''
Expand Down

0 comments on commit 0e8056c

Please sign in to comment.