diff options
author | Joe Wilm <joe@jwilm.com> | 2016-07-04 14:46:25 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-07-04 14:46:25 -0700 |
commit | 14ec851c6947eb4a65f20b3b41fadd6d4f19cb2d (patch) | |
tree | 55afac31d52b82d20a4fb67bd21313a77bb4d8e6 /src/main.rs | |
parent | 4426e57320d441a31c7c142c9694176f62e050b5 (diff) | |
download | alacritty-14ec851c6947eb4a65f20b3b41fadd6d4f19cb2d.tar.gz alacritty-14ec851c6947eb4a65f20b3b41fadd6d4f19cb2d.zip |
Use "invert" cursor instead of drawing block
The cursor now matches perfectly cell widths and actually shows the
character underneath.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index 5c52dcda..be45ed11 100644 --- a/src/main.rs +++ b/src/main.rs @@ -110,6 +110,7 @@ fn main() { .with_vsync() .with_title("Alacritty") .build().unwrap(); + window.set_window_resize_callback(Some(window_resize_handler as fn(u32, u32))); gl::load_with(|symbol| window.get_proc_address(symbol) as *const _); @@ -271,18 +272,14 @@ fn main() { } { - // Draw grid + cursor + // Draw grid { let _sampler = meter.sampler(); - renderer.with_api(terminal.size_info(), |mut api| { + let size_info = terminal.size_info().clone(); + renderer.with_api(&size_info, |mut api| { // Draw the grid - api.render_grid(terminal.grid(), &mut glyph_cache); - - // Also draw the cursor - if terminal.mode().contains(term::mode::SHOW_CURSOR) { - api.render_cursor(terminal.cursor(), &mut glyph_cache); - } + api.render_grid(&terminal.render_grid(), &mut glyph_cache); }) } |