]> granicus.if.org Git - vim/commitdiff
patch 8.1.1459: popup window border looks bad when 'ambiwidth' is "double" v8.1.1459
authorBram Moolenaar <Bram@vim.org>
Mon, 3 Jun 2019 20:21:27 +0000 (22:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 3 Jun 2019 20:21:27 +0000 (22:21 +0200)
Problem:    Popup window border looks bad when 'ambiwidth' is "double".
            (Yasuhiro Matsumoto)
Solution:   Only use line drawing characters when 'ambiwidth' is "single".
            (Ken Takata, closes #4477)

src/screen.c
src/version.c

index 53343e8c84e87d85c4fde631f46b11e6c7612d35..d72d7792cc64704a818614481dd795a7bb324b2f 100644 (file)
@@ -1078,7 +1078,9 @@ update_popups(void)
                + wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2];
        popup_attr = get_wcr_attr(wp);
 
-       if (enc_utf8)
+       // We can only use these line drawing characters when 'encoding' is
+       // "utf-8" and 'ambiwidth' is "single".
+       if (enc_utf8 && p_ambw == 's')
        {
            border_char[0] = border_char[2] = 0x2550;
            border_char[1] = border_char[3] = 0x2551;
index 53a2644f94a4af2c77b85007e0f6fe01f8412633..accea72f1e67a4ddaa064ca63ff7b7c59391c090 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1459,
 /**/
     1458,
 /**/