Add mouse-scrollable pager with fallback to system pager

This commit is contained in:
2026-04-01 18:23:06 -07:00
parent e5194a7793
commit e74f9a3c74
2 changed files with 43 additions and 1 deletions

View File

@@ -9,6 +9,8 @@ from rich.json import JSON as RichJSON
from rich.markdown import Markdown
from rich.syntax import Syntax
from rp.pager import MousePager
@dataclass
class RenderOptions:
@@ -54,7 +56,7 @@ def render(
)
if use_pager:
with console.pager(styles=True):
with console.pager(pager=MousePager(), styles=True):
console.print(renderable)
else:
console.print(renderable)