aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/markdown.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-08 08:32:13 +0000
committerBlaž Hrastnik2021-03-08 08:32:13 +0000
commit8fe459066605a794f8dceedaf872f71ffd4c750a (patch)
tree0d3f10b3668dbfc8aa7805d1974f89ed1333b60d /helix-term/src/ui/markdown.rs
parentddcf5156c0260debc522b0420f93e0c523697eb4 (diff)
ui: popup: scroll documentation popups with c-u/c-d.
Diffstat (limited to 'helix-term/src/ui/markdown.rs')
-rw-r--r--helix-term/src/ui/markdown.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs
index 976d00fa..3040e1ca 100644
--- a/helix-term/src/ui/markdown.rs
+++ b/helix-term/src/ui/markdown.rs
@@ -112,8 +112,9 @@ impl Component for Markdown {
let contents = Text::from(lines);
- let par = Paragraph::new(contents).wrap(Wrap { trim: false });
- // .scroll(x, y) offsets
+ let par = Paragraph::new(contents)
+ .wrap(Wrap { trim: false })
+ .scroll((cx.scroll.unwrap_or_default() as u16, 0));
let area = Rect::new(area.x + 1, area.y + 1, area.width - 2, area.height - 2);
par.render(area, surface);