diff --git a/src/buffer/node.rs b/src/buffer/node.rs index c563565..afcbf99 100644 --- a/src/buffer/node.rs +++ b/src/buffer/node.rs @@ -321,8 +321,6 @@ impl BufferNode { }, BufferNodeData::Branch(ref left, ref right) => { - let lh = f.single_line_height(); - if rounding.0 == RoundingBehavior::Round { // TODO return 0; diff --git a/src/term_ui/formatter.rs b/src/term_ui/formatter.rs index 7fc88d9..17a2ed6 100644 --- a/src/term_ui/formatter.rs +++ b/src/term_ui/formatter.rs @@ -58,7 +58,7 @@ impl<'a> LineFormatter for ConsoleLineFormatter { dim = (max(dim.0, pos.0), max(dim.1, pos.1 + width)); } - dim.0 += 1; + dim.0 += self.single_line_height(); return dim; } diff --git a/src/term_ui/mod.rs b/src/term_ui/mod.rs index 74ad61f..205e0ac 100644 --- a/src/term_ui/mod.rs +++ b/src/term_ui/mod.rs @@ -351,13 +351,10 @@ impl TermUI { for line in line_iter { let mut g_iter = editor.buffer.formatter.vis_grapheme_iter(line); - let mut last_y = 0; // Loop through the graphemes of the line and print them to // the screen. for (g, (pos_y, pos_x), width) in g_iter { - last_y = pos_y; - // Calculate the cell coordinates at which to draw the grapheme let px = pos_x as isize + screen_col - editor.view_pos.1 as isize; let py = pos_y as isize + screen_line - editor.view_pos.0 as isize;