diff options
author | Ville Hakulinen <ville.hakulinen@gmail.com> | 2020-07-06 11:31:54 +0300 |
---|---|---|
committer | Ville Hakulinen <ville.hakulinen@gmail.com> | 2020-07-12 01:57:30 +0300 |
commit | 33f0dded6d2dc8ec99767de92ae1f6abf1e0fc55 (patch) | |
tree | d019112c9a476724953a5d83638ff5a1112e2c93 | |
parent | 2c3a31cfa4294681cb50fcbe8745a2da43540052 (diff) |
Add note about context resizing
-rw-r--r-- | src/ui/grid/context.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/grid/context.rs b/src/ui/grid/context.rs index 9018b29..37322fa 100644 --- a/src/ui/grid/context.rs +++ b/src/ui/grid/context.rs @@ -172,7 +172,11 @@ impl Context { ctx.set_source_surface(&s, 0.0, 0.0); ctx.set_operator(cairo::Operator::Source); // Make sure we only paint the area that _was_ visible before this update - // so we don't undo the bg color paint we did earlier. + // so we don't undo the bg color paint we did earlier. Note that we're + // calculating the used area based on the current cell metrics. This is + // becuase if font changes that might reduce the area we "have available". + // Otherwise, when changing to smaller font, we might draw our "old" surface + // on a area that wont be cleared by nvim (e.g. over "fresh" whitespace). ctx.rectangle( 0.0, 0.0, |