Add mouse-scrollable pager with fallback to system pager
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user