]> granicus.if.org Git - vim/commitdiff
patch 8.0.0353: if [RO] is translated it may be truncated v8.0.0353
authorBram Moolenaar <Bram@vim.org>
Thu, 23 Feb 2017 13:55:59 +0000 (14:55 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 23 Feb 2017 13:55:59 +0000 (14:55 +0100)
Problem:    If [RO] in the status line is translated to a longer string, it is
            trunctted to 4 bytes.
Solution:   Skip over the resulting string. (Jente Hidskes, closes #1499)

src/screen.c
src/version.c

index 18ae8b902ae243c931e7acb778376955fca92acf..d801c4cc1641fd44749527cf19c1a00f85d47dc1 100644 (file)
@@ -6730,7 +6730,7 @@ win_redr_status(win_T *wp)
        if (wp->w_buffer->b_p_ro)
        {
            STRCPY(p + len, _("[RO]"));
-           len += 4;
+           len += (int)STRLEN(p + len);
        }
 
        this_ru_col = ru_col - (Columns - W_WIDTH(wp));
index 021704a853a8919fce6c8fd77c0542390718fa46..da1ca4b9e27b02ed0a44b17486374d053ffd7322 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    353,
 /**/
     352,
 /**/