diff options
-rw-r--r-- | win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1227,8 +1227,8 @@ bool InsertTextBufferClipboard(Textbuf *tb) dataptr = data; for (; IsValidAsciiChar(*dataptr) && (tb->length + length) < (tb->maxlength - 1) && - (tb->maxwidth == 0 || width + tb->width + GetCharacterWidth((byte)*dataptr) <= tb->maxwidth); dataptr++) { - width += GetCharacterWidth((byte)*dataptr); + (tb->maxwidth == 0 || width + tb->width + GetCharacterWidth(FS_NORMAL, (byte)*dataptr) <= tb->maxwidth); dataptr++) { + width += GetCharacterWidth(FS_NORMAL, (byte)*dataptr); length++; } |