Skip to content

Commit

Permalink
Switch to crosstermion 0.3 for tui 0.10 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Jul 22, 2020
1 parent 4812206 commit fd8c441
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 37 deletions.
44 changes: 9 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ colored = "2.0.0"

# 'tui' related
unicode-segmentation = { version = "1.3.0", optional = true }
crosstermion = { optional = true, version = "0.2.0", default-features = false }
crosstermion = { optional = true, version = "0.3.0", default-features = false }
tui = { version = "0.10.0", optional = true, default-features = false }
tui-react = { version = "0.10", optional = true }
open = { version = "1.2.2", optional = true }
Expand Down
3 changes: 2 additions & 1 deletion src/interactive/widgets/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ impl HelpPane {
.title(title)
.border_style(*border_style)
.borders(Borders::ALL);
let inner_block_area = block.inner(area);
block.render(area, buf);

if *has_focus {
Expand All @@ -211,7 +212,7 @@ impl HelpPane {
}
}

let area = margin(block.inner(area), 1);
let area = margin(inner_block_area, 1);
self.scroll = self.scroll.min(num_lines.saturating_sub(area.height));
Paragraph::new(Text::from(Spans::from(texts)))
.scroll((self.scroll, 0))
Expand Down

0 comments on commit fd8c441

Please sign in to comment.