To: vim-dev@vim.org Subject: Patch 6.1.181 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.181 Problem: If the terminal doesn't wrap from the last char in a line to the next line, the last column is blanked out. (Peter Karp) Solution: Don't output a space to mark the wrap, but the same character again. Files: src/screen.c *** ../vim61.180/src/screen.c Sun Aug 18 16:42:19 2002 --- src/screen.c Sat Sep 14 22:02:25 2002 *************** *** 3851,3863 **** && W_WIDTH(wp) == Columns) { /* First make sure we are at the end of the screen line, then ! * output an arbitrary character to let the terminal know ! * about the wrap. */ if (screen_cur_col != W_WIDTH(wp)) screen_char(LineOffset[screen_row - 1] + (unsigned)Columns - 1, screen_row - 1, (int)(Columns - 1)); ! out_char(' '); /* force a redraw of the first char on the next line */ ScreenAttrs[LineOffset[screen_row]] = (sattr_T)-1; screen_start(); /* don't know where cursor is now */ --- 3851,3874 ---- && W_WIDTH(wp) == Columns) { /* First make sure we are at the end of the screen line, then ! * output the same character again to let the terminal know ! * about the wrap. If the terminal doesn't auto-wrap, we ! * overwrite the character. */ if (screen_cur_col != W_WIDTH(wp)) screen_char(LineOffset[screen_row - 1] + (unsigned)Columns - 1, screen_row - 1, (int)(Columns - 1)); ! ! #ifdef FEAT_MBYTE ! /* When there is a multi-byte character, just output a space ! * to keep it simple. */ ! if (has_mbyte && mb_off2cells(LineOffset[screen_row - 1] ! + (unsigned)Columns - 1) != 1) ! out_char(' '); ! else ! #endif ! out_char(ScreenLines[LineOffset[screen_row - 1] ! + (Columns - 1)]); /* force a redraw of the first char on the next line */ ScreenAttrs[LineOffset[screen_row]] = (sattr_T)-1; screen_start(); /* don't know where cursor is now */ *** ../vim61.180/src/version.c Mon Sep 16 21:12:28 2002 --- src/version.c Mon Sep 16 21:13:49 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 181, /**/ -- Your company is doomed if your primary product is overhead transparencies. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///