summaryrefslogtreecommitdiffstats
path: root/src/draw.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2019-10-13 22:54:35 -0700
committerGitHub <noreply@github.com>2019-10-13 22:54:35 -0700
commit8b186b2dfc9f45610490138b850d6cb939525f04 (patch)
tree9bffcc150e0661f73ab76059968f29275d179447 /src/draw.rs
parentb235110c1ed72fc581c2df41e85de2dc21377fe9 (diff)
parentd6cb09eafe622598479cfa0b2ece63b8a91f5026 (diff)
Merge pull request #22 from dandavison/10-allow-less-extra-column
Fix width calculation and terminating newline when writing underline
Diffstat (limited to 'src/draw.rs')
-rw-r--r--src/draw.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/draw.rs b/src/draw.rs
index bf3cf5f1..29670693 100644
--- a/src/draw.rs
+++ b/src/draw.rs
@@ -57,7 +57,8 @@ pub fn write_underlined(
heavy: bool,
) -> std::io::Result<()> {
writeln!(writer, "{}", line_style.paint(text))?;
- write_horizontal_line(writer, line_width, line_style, heavy)?;
+ write_horizontal_line(writer, line_width - 1, line_style, heavy)?;
+ write!(writer, "\n")?;
Ok(())
}