comparison src/screen.c @ 2661:a03f7551bacc v7.3.081

updated for version 7.3.081 Problem: Non-printable characters in 'statusline' cause trouble. (ZyX) Solution: Use transstr(). (partly by Caio Ariede)
author Bram Moolenaar <bram@vim.org>
date Wed, 08 Dec 2010 19:56:58 +0100
parents 37d3f90f5203
children f987220caa57
comparison
equal deleted inserted replaced
2660:e19ecdb13f34 2661:a03f7551bacc
3403 # ifdef FEAT_DIFF 3403 # ifdef FEAT_DIFF
3404 && filler_todo <= 0 3404 && filler_todo <= 0
3405 # endif 3405 # endif
3406 ) 3406 )
3407 { 3407 {
3408 int_u text_sign; 3408 int text_sign;
3409 # ifdef FEAT_SIGN_ICONS 3409 # ifdef FEAT_SIGN_ICONS
3410 int_u icon_sign; 3410 int icon_sign;
3411 # endif 3411 # endif
3412 3412
3413 /* Draw two cells with the sign value or blank. */ 3413 /* Draw two cells with the sign value or blank. */
3414 c_extra = ' '; 3414 c_extra = ' ';
3415 char_attr = hl_attr(HLF_SC); 3415 char_attr = hl_attr(HLF_SC);
6520 width = build_stl_str_hl(wp == NULL ? curwin : wp, 6520 width = build_stl_str_hl(wp == NULL ? curwin : wp,
6521 buf, sizeof(buf), 6521 buf, sizeof(buf),
6522 stl, use_sandbox, 6522 stl, use_sandbox,
6523 fillchar, maxwidth, hltab, tabtab); 6523 fillchar, maxwidth, hltab, tabtab);
6524 vim_free(stl); 6524 vim_free(stl);
6525
6526 /* Make all characters printable. */
6527 p = transstr(buf);
6528 if (p != NULL)
6529 {
6530 vim_strncpy(buf, p, sizeof(buf) - 1);
6531 vim_free(p);
6532 }
6533
6534 /* fill up with "fillchar" */
6525 len = (int)STRLEN(buf); 6535 len = (int)STRLEN(buf);
6526
6527 while (width < maxwidth && len < (int)sizeof(buf) - 1) 6536 while (width < maxwidth && len < (int)sizeof(buf) - 1)
6528 { 6537 {
6529 #ifdef FEAT_MBYTE 6538 #ifdef FEAT_MBYTE
6530 len += (*mb_char2bytes)(fillchar, buf + len); 6539 len += (*mb_char2bytes)(fillchar, buf + len);
6531 #else 6540 #else