Misc code cleanup.

This commit is contained in:
Nathan Vegdahl 2015-01-28 00:09:07 -08:00
parent f222cd6a54
commit 5652b62fc8
3 changed files with 1 additions and 6 deletions

View File

@ -321,8 +321,6 @@ impl BufferNode {
}, },
BufferNodeData::Branch(ref left, ref right) => { BufferNodeData::Branch(ref left, ref right) => {
let lh = f.single_line_height();
if rounding.0 == RoundingBehavior::Round { if rounding.0 == RoundingBehavior::Round {
// TODO // TODO
return 0; return 0;

View File

@ -58,7 +58,7 @@ impl<'a> LineFormatter for ConsoleLineFormatter {
dim = (max(dim.0, pos.0), max(dim.1, pos.1 + width)); dim = (max(dim.0, pos.0), max(dim.1, pos.1 + width));
} }
dim.0 += 1; dim.0 += self.single_line_height();
return dim; return dim;
} }

View File

@ -351,13 +351,10 @@ impl TermUI {
for line in line_iter { for line in line_iter {
let mut g_iter = editor.buffer.formatter.vis_grapheme_iter(line); 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 // Loop through the graphemes of the line and print them to
// the screen. // the screen.
for (g, (pos_y, pos_x), width) in g_iter { for (g, (pos_y, pos_x), width) in g_iter {
last_y = pos_y;
// Calculate the cell coordinates at which to draw the grapheme // 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 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; let py = pos_y as isize + screen_line - editor.view_pos.0 as isize;