comparison src/evalfunc.c @ 24198:c784e176334c v8.2.2640

patch 8.2.2640: screenstring() returns non-existing composing characters Commit: https://github.com/vim/vim/commit/f1387285e2ebe5cb3688d729fc6fd01a169a76c1 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 22 17:11:15 2021 +0100 patch 8.2.2640: screenstring() returns non-existing composing characters Problem: screenstring() returns non-existing composing characters. Solution: Only use composing characters if there is a base character.
author Bram Moolenaar <Bram@vim.org>
date Mon, 22 Mar 2021 17:15:04 +0100
parents 512f48dc7100
children 35603c7991d7
comparison
equal deleted inserted replaced
24197:3e3376cc7bb7 24198:c784e176334c
7900 c = ScreenLinesUC[off]; 7900 c = ScreenLinesUC[off];
7901 else 7901 else
7902 c = ScreenLines[off]; 7902 c = ScreenLines[off];
7903 buflen += mb_char2bytes(c, buf); 7903 buflen += mb_char2bytes(c, buf);
7904 7904
7905 if (enc_utf8) 7905 if (enc_utf8 && ScreenLinesUC[off] != 0)
7906 for (i = 0; i < Screen_mco && ScreenLinesC[i][off] != 0; ++i) 7906 for (i = 0; i < Screen_mco && ScreenLinesC[i][off] != 0; ++i)
7907 buflen += mb_char2bytes(ScreenLinesC[i][off], buf + buflen); 7907 buflen += mb_char2bytes(ScreenLinesC[i][off], buf + buflen);
7908 7908
7909 buf[buflen] = NUL; 7909 buf[buflen] = NUL;
7910 rettv->vval.v_string = vim_strsave(buf); 7910 rettv->vval.v_string = vim_strsave(buf);