1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00

Remove outdated TODO/FIXME comments

This commit is contained in:
Christian Duerr 2019-09-21 19:54:32 +02:00 committed by GitHub
parent 71a818cb8f
commit 856cddc873
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 17 deletions

View file

@ -426,7 +426,6 @@ where
}
// The evented instances are not dropped here so deregister them explicitly
// TODO: Is this still necessary?
let _ = self.poll.deregister(&self.rx);
let _ = self.pty.deregister(&self.poll);

View file

@ -45,8 +45,6 @@ pub const FONT_SIZE_STEP: f32 = 0.5;
///
/// An escape sequence may be emitted in case specific keys or key combinations
/// are activated.
///
/// TODO also need terminal state when processing input
pub struct Processor<'a, A: 'a> {
pub key_bindings: &'a [KeyBinding],
pub mouse_bindings: &'a [MouseBinding],

View file

@ -32,8 +32,9 @@ use crate::gl;
use crate::gl::types::*;
use crate::index::{Column, Line};
use crate::renderer::rects::RenderRect;
use crate::term::cell::{self, Flags};
use crate::term::color::Rgb;
use crate::term::{self, cell, RenderableCell, RenderableCellContent};
use crate::term::{self, RenderableCell, RenderableCellContent};
pub mod rects;
@ -977,7 +978,7 @@ impl<'a> RenderApi<'a> {
}),
bg: color.unwrap_or(Rgb { r: 0, g: 0, b: 0 }),
fg: Rgb { r: 0, g: 0, b: 0 },
flags: cell::Flags::empty(),
flags: Flags::empty(),
bg_alpha,
})
.collect::<Vec<_>>();
@ -1026,19 +1027,15 @@ impl<'a> RenderApi<'a> {
};
// Get font key for cell
// FIXME this is super inefficient.
let font_key = match (
cell.flags.contains(cell::Flags::BOLD),
cell.flags.contains(cell::Flags::ITALIC),
) {
(false, false) => glyph_cache.font_key,
(true, false) => glyph_cache.bold_key,
(false, true) => glyph_cache.italic_key,
(true, true) => glyph_cache.bold_italic_key,
let font_key = match cell.flags & Flags::BOLD_ITALIC {
Flags::BOLD_ITALIC => glyph_cache.bold_italic_key,
Flags::ITALIC => glyph_cache.italic_key,
Flags::BOLD => glyph_cache.bold_key,
_ => glyph_cache.font_key,
};
// Don't render text of HIDDEN cells
let mut chars = if cell.flags.contains(cell::Flags::HIDDEN) {
let mut chars = if cell.flags.contains(Flags::HIDDEN) {
[' '; cell::MAX_ZEROWIDTH_CHARS + 1]
} else {
chars

View file

@ -26,6 +26,7 @@ bitflags! {
const INVERSE = 0b00_0000_0001;
const BOLD = 0b00_0000_0010;
const ITALIC = 0b00_0000_0100;
const BOLD_ITALIC = 0b00_0000_0110;
const UNDERLINE = 0b00_0000_1000;
const WRAPLINE = 0b00_0001_0000;
const WIDE_CHAR = 0b00_0010_0000;

View file

@ -13,8 +13,6 @@
// limitations under the License.
//
//! Font rendering based on CoreText
//!
//! TODO error handling... just search for unwrap.
#![allow(improper_ctypes)]
use std::collections::HashMap;
use std::path::PathBuf;