diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-09-06 19:25:11 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-09-06 19:25:11 +0000 |
commit | cafda4f89323b8e76818f03d81b1d0b1887862aa (patch) | |
tree | ee5f5d0f72b8563d197736948517604c677b7052 /src/ex_getln.c | |
parent | 4440382f3c971684571e9c7494130cdd68567fd5 (diff) | |
download | vim-cafda4f89323b8e76818f03d81b1d0b1887862aa.zip |
updated for version 7.0142
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index c6190bed6..544e76be2 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -2369,17 +2369,24 @@ draw_cmdline(start, len) * Do arabic shaping into a temporary buffer. This is very * inefficient! */ - if (len * 2 > buflen) + if (len * 2 + 2 > buflen) { /* Re-allocate the buffer. We keep it around to avoid a lot of * alloc()/free() calls. */ vim_free(arshape_buf); - buflen = len * 2; + buflen = len * 2 + 2; arshape_buf = alloc(buflen); if (arshape_buf == NULL) return; /* out of memory */ } + if (utf_iscomposing(utf_ptr2char(ccline.cmdbuff + start))) + { + /* Prepend a space to draw the leading composing char on. */ + arshape_buf[0] = ' '; + newlen = 1; + } + for (j = start; j < start + len; j += mb_l) { p = ccline.cmdbuff + j; |