fix clippy and formatting

macos-click-through
Keith Simmons 3 years ago
parent 35f46ebb5f
commit fb9c1de747

@ -220,7 +220,6 @@ impl Window {
(start + width, line_fragment)
}
// Redraw line by calling build_line_fragment starting at 0
// until current_start is greater than the grid width and sending the resulting
// fragments as a batch

@ -371,9 +371,7 @@ impl CursorRenderer {
canvas.clip_path(&path, None, Some(false));
let y_adjustment = grid_renderer.shaper.y_adjustment();
let blobs = &grid_renderer
.shaper
.shape_cached(character, false, false);
let blobs = &grid_renderer.shaper.shape_cached(character, false, false);
for blob in blobs.iter() {
canvas.draw_text_blob(

@ -118,7 +118,7 @@ impl GridRenderer {
// We don't want to clip text in the x position, only the y so we add a buffer of 1
// character on either side of the region so that we clip vertically but not horizontally
let (grid_x, grid_y) = grid_position;
let clip_position = (grid_x.checked_sub(1).unwrap_or(0), grid_y);
let clip_position = (grid_x.saturating_sub(1), grid_y);
let region = self.compute_text_region(clip_position, cell_width + 2);
canvas.clip_rect(region, None, Some(false));

@ -9,7 +9,7 @@ use skia_safe::{
use super::animation_utils::*;
use super::{GridRenderer, RendererSettings};
use crate::editor::{WindowDrawCommand, LineFragment};
use crate::editor::{LineFragment, WindowDrawCommand};
use crate::redraw_scheduler::REDRAW_SCHEDULER;
use crate::utils::Dimensions;
@ -348,7 +348,7 @@ impl RenderedWindow {
..
} = line_fragment;
let grid_position = (*window_left, *window_top);
grid_renderer.draw_background(canvas, grid_position, *width, &style);
grid_renderer.draw_background(canvas, grid_position, *width, style);
}
for line_fragment in line_fragments.into_iter() {
@ -357,7 +357,7 @@ impl RenderedWindow {
window_left,
window_top,
width,
style
style,
} = line_fragment;
let grid_position = (window_left, window_top);
grid_renderer.draw_foreground(canvas, text, grid_position, width, &style);

Loading…
Cancel
Save