From 15d02a0417eda7e4f436a8448434681bacdeb79f Mon Sep 17 00:00:00 2001 From: keith Date: Thu, 8 Oct 2020 10:37:57 -0700 Subject: [PATCH] slightly better rendering --- src/editor/window.rs | 3 +-- src/renderer/rendered_window.rs | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/editor/window.rs b/src/editor/window.rs index a2be45f..cb5927a 100644 --- a/src/editor/window.rs +++ b/src/editor/window.rs @@ -231,7 +231,7 @@ impl Window { // Build up the actual text to be rendered including the contiguously styled bits. let mut text = String::new(); - for x in draw_command_start_index..draw_command_end_index { + for x in draw_command_start_index..(draw_command_end_index + 1) { let (character, _) = row[x as usize].as_ref().unwrap(); text.push_str(character); } @@ -270,7 +270,6 @@ impl Window { let mut current_start = column_start; while current_start < column_pos { - println!("{}", current_start); if let Some(next_start) = self.send_draw_command(row, column_start, current_start) { current_start = next_start; } else { diff --git a/src/renderer/rendered_window.rs b/src/renderer/rendered_window.rs index 05a4295..0fdbddc 100644 --- a/src/renderer/rendered_window.rs +++ b/src/renderer/rendered_window.rs @@ -219,8 +219,6 @@ impl RenderedWindow { } => { let grid_position = (window_left, window_top); - // println!("{} left: {} top: {}", text, window_left, window_top); - { let mut background_canvas = self.background_surface.canvas(); renderer.draw_background(