To: vim-dev@vim.org Subject: patch 5.5.055 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.5.055 Problem: Using "$r-" in blockwise Visual mode replaces one character beyond the end of the line. (Zivkov) Solution: Only replace existing characters. Files: src/ops.c *** ../vim-5.5.54/src/ops.c Thu Sep 30 19:34:26 1999 --- src/ops.c Sun Dec 5 20:22:09 1999 *************** *** 1611,1622 **** /* insert pre-spaces */ copy_spaces(newp + bd.textcol, (size_t)bd.startspaces); /* insert replacement chars CHECK FOR ALLOCATED SPACE */ ! if (bd.is_short) ! copy_chars(newp + STRLEN(newp), (size_t)bd.textlen, c); ! else { - copy_chars(newp + STRLEN(newp), - (size_t)(oap->end_vcol - oap->start_vcol + 1), c); /* insert post-spaces */ copy_spaces(newp + STRLEN(newp), (size_t)bd.endspaces); /* copy the part after the changed part */ --- 1611,1619 ---- /* insert pre-spaces */ copy_spaces(newp + bd.textcol, (size_t)bd.startspaces); /* insert replacement chars CHECK FOR ALLOCATED SPACE */ ! copy_chars(newp + STRLEN(newp), (size_t)bd.textlen, c); ! if (!bd.is_short) { /* insert post-spaces */ copy_spaces(newp + STRLEN(newp), (size_t)bd.endspaces); /* copy the part after the changed part */ *** ../vim-5.5.54/src/version.c Sun Dec 5 20:27:29 1999 --- src/version.c Sun Dec 5 20:27:12 1999 *************** *** 420,420 **** --- 420,421 ---- { /* Add new patch number below this line */ + 55, -- hundred-and-one symptoms of being an internet addict: 246. You use up your free 100 hours in less than a week. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /