AnalogTerm2: Better adjust cursor vertical size IRT leading
authorMatthew Mondor <mmondor@pulsar-zone.net>
Sat, 15 Apr 2023 07:59:40 +0000 (07:59 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Sat, 15 Apr 2023 07:59:40 +0000 (07:59 +0000)
mmsoftware/analogterm2/TODO.txt
mmsoftware/analogterm2/src/draw.c

index 64b72c5..aff34e1 100644 (file)
@@ -30,7 +30,7 @@
   https://en.wikipedia.org/wiki/Box-drawing_character
 - Overwrite/clear selections before freeing them
 - ≣ † ☆ ツ ⌘›🍺∴ ( ͡° ͜ʖ ͡°)   ƒ   ︵  ₂   😈  θ  ƒ  ›  ʼ  ƒ ∂  ʻ  μ  ›  ∫   ◇ ♪
-  ► ə β ə ſ ρ ə ∴ ♪ 😱 † 😳 › ▛
+  ► ə β ə ſ ρ ə ∴ ♪ 😱 † 😳 › ▛ ᵗ
 - Verify if dead key support is incomplete for ISO-8859-4 and ISO-8859-10.
   There were special characters that were unicode since the start but also
   could have punctuation.  And others that used two at a time...  It might
index ca9af74..88ee2fe 100644 (file)
@@ -257,13 +257,15 @@ static void
 draw_lines(state_t *st, screen_t *sc, int low, int high)
 {
        uint32_t *scanptr1, *scanptr2, *scanptr1_next;
-       int row, srow, urow;
+       int row, srow, urow, crow;
 
        color = st->monocolor;
 
        /* Row to underline or strike if the attribute is enabled */
        srow = (int)ceil(((double)FONT_HEIGHT) / 2.0);
        urow = (FONT_HEIGHT - 1) + (cfg_leading > 0 ? 1 : 0);
+       /* Row to stop cursor at */
+       crow = (FONT_HEIGHT - 1) + (cfg_leading > 2 ? 2 : cfg_leading);
 
        if (high < low || low < 0 || high >= cfg_text_height) {
                /* Invalid */
@@ -428,7 +430,7 @@ draw_lines(state_t *st, screen_t *sc, int low, int high)
        }
 
                /* Inverse for XOR cursor */
-               if (cursor_xor == col && grow <= urow &&
+               if (cursor_xor == col && grow <= crow &&
                    ((st->cursor_mode == CMODE_BLOCK) ||
                     (st->cursor_mode == CMODE_LINE &&
                      grow >= (FONT_HEIGHT - 2)) ||