aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-03-02 22:35:19 +0300
committerGitHub <noreply@github.com>2022-03-02 22:35:19 +0300
commitd8113dc2b649f5e5b14fa26a08d13968bfa8c096 (patch)
tree077960e041a853527c14e2b5497f1ceab84241d9
parent1880522b64d9a5276acea428705c011cbbf8c04c (diff)
downloadr-alacritty-d8113dc2b649f5e5b14fa26a08d13968bfa8c096.tar.gz
r-alacritty-d8113dc2b649f5e5b14fa26a08d13968bfa8c096.tar.bz2
r-alacritty-d8113dc2b649f5e5b14fa26a08d13968bfa8c096.zip
Fix gap calculation for dashed underline
-rw-r--r--alacritty/res/rect.f.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/alacritty/res/rect.f.glsl b/alacritty/res/rect.f.glsl
index 10c7983a..0e0a2616 100644
--- a/alacritty/res/rect.f.glsl
+++ b/alacritty/res/rect.f.glsl
@@ -98,12 +98,12 @@ color_t draw_dotted(float_t x, float_t y) {
color_t draw_dashed(float_t x) {
// Since dashes of adjacent cells connect with each other our dash length is
// half of the desired total length.
- float_t halfDashLen = floor(cellWidth / 4.);
+ float_t halfDashLen = floor(cellWidth / 4. + 0.5);
float_t alpha = 1.;
// Check if `x` coordinate is where we should draw gap.
- if (x > halfDashLen && x < cellWidth - halfDashLen - 1.) {
+ if (x > halfDashLen - 1. && x < cellWidth - halfDashLen) {
alpha = 0.;
}