diff options
author | Ville Hakulinen <ville.hakulinen@gmail.com> | 2020-07-06 16:22:15 +0300 |
---|---|---|
committer | Ville Hakulinen <ville.hakulinen@gmail.com> | 2020-07-12 01:57:30 +0300 |
commit | f3ddcdbe5e4ee94a40094836072b6336cd503781 (patch) | |
tree | 86e47b43b0f30946f6cff7b0c47b05968a6f895f | |
parent | c2456c00c9ebacdabf4021c97774e74cb2a5b4d8 (diff) |
Remove old TODOs
-rw-r--r-- | src/ui/grid/grid.rs | 4 | ||||
-rw-r--r-- | src/ui/state.rs | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/ui/grid/grid.rs b/src/ui/grid/grid.rs index 06963d6..687a9d9 100644 --- a/src/ui/grid/grid.rs +++ b/src/ui/grid/grid.rs @@ -387,11 +387,11 @@ impl Grid { } } - /// Calcualtes the current size of the grid. + /// Calcualtes the size of a grid that can fit in the current drawingarea + /// with current cell metrics. pub fn calc_size(&self) -> (i64, i64) { let ctx = self.context.borrow(); - // TODO(ville): Dont relay on the drawingarea's size. let w = self.da.get_allocated_width(); let h = self.da.get_allocated_height(); let cols = (w / ctx.cell_metrics.width as i32) as i64; diff --git a/src/ui/state.rs b/src/ui/state.rs index 9cdd767..563a96d 100644 --- a/src/ui/state.rs +++ b/src/ui/state.rs @@ -375,8 +375,6 @@ impl UIState { ); } - // TODO(ville): Use the root container to get the main grid's size and make - // sure that it (the root contianer widget) has proper size. let grid = self.grids.get(&1).unwrap(); let (cols, rows) = grid.calc_size(); @@ -391,7 +389,7 @@ impl UIState { if let Err(err) = nvim.ui_try_resize(cols as i64, rows as i64).await { - error!("Error: failed to resize nvim on line space change ({:?})", err); + error!("Error: failed to resize nvim ({:?})", err); } }); |