summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Hakulinen <ville.hakulinen@gmail.com>2020-07-06 11:31:54 +0300
committerVille Hakulinen <ville.hakulinen@gmail.com>2020-07-12 01:57:30 +0300
commit33f0dded6d2dc8ec99767de92ae1f6abf1e0fc55 (patch)
treed019112c9a476724953a5d83638ff5a1112e2c93
parent2c3a31cfa4294681cb50fcbe8745a2da43540052 (diff)
Add note about context resizing
-rw-r--r--src/ui/grid/context.rs6
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,