To: vim-dev@vim.org Subject: Patch 5.6.055 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.6.055 Problem: When 'statusline' only contains a text without "%" and doesn't fit in the window, Vim crashes. (Ron Aaron) Solution: Don't use the pointer for the first item if there is no item. Files: src/screen.c *** ../vim-5.6.54/src/screen.c Wed Feb 9 22:17:24 2000 --- src/screen.c Tue Apr 4 20:43:22 2000 *************** *** 3068,3075 **** for (l = 0; l < itemcnt; l++) if (item[l].type == Trunc) break; ! l = l == itemcnt ? 0 : l; ! s = item[l].start; if ((int) (s - out) > maxlen) { /* Truncation mark is beyond max length */ s = out + maxlen - 1; --- 3068,3080 ---- for (l = 0; l < itemcnt; l++) if (item[l].type == Trunc) break; ! if (itemcnt == 0) ! s = out; ! else ! { ! l = l == itemcnt ? 0 : l; ! s = item[l].start; ! } if ((int) (s - out) > maxlen) { /* Truncation mark is beyond max length */ s = out + maxlen - 1; *************** *** 3083,3089 **** else { p = s + num - maxlen; ! mch_memmove(s, p, STRLEN(s) + 1); *s = '<'; for (; l < itemcnt; l++) item[l].start -= num - maxlen; --- 3088,3094 ---- else { p = s + num - maxlen; ! mch_memmove(s, p, STRLEN(p) + 1); *s = '<'; for (; l < itemcnt; l++) item[l].start -= num - maxlen; *** ../vim-5.6.54/src/version.c Tue Apr 4 20:49:35 2000 --- src/version.c Tue Apr 4 20:49:06 2000 *************** *** 420,421 **** --- 420,423 ---- { /* Add new patch number below this line */ + /**/ + 55, /**/ -- (letter from Mark to Mike, about the film's probale certificate) For an 'A' we would have to: Lose as may shits as possible Take Jesus Christ out, if possible Loose "I fart in your general direction" Lose "the oral sex" Lose "oh, fuck off" Lose "We make castanets out of your testicles" "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /-/-- Bram Moolenaar --- Bram@moolenaar.net --- http://www.moolenaar.net --\-\ \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/