* When a multicolumn character was inserted and then replaced, the visual

screen representation was sometimes not updated accordingly.
This commit is contained in:
Gunnar Ritter 2005-01-10 19:32:47 +00:00
parent 6f9ef30277
commit 5a5e906d9e
3 changed files with 15 additions and 9 deletions

View File

@ -2,6 +2,8 @@ Release ...
* When a multicolumn character was replaced by another multicolumn character * When a multicolumn character was replaced by another multicolumn character
in insert mode, the display was not updated appropriately with terminals in insert mode, the display was not updated appropriately with terminals
other than xterm. other than xterm.
* When a multicolumn character was inserted and then replaced, the visual
screen representation was sometimes not updated accordingly.
* The '\u', '\l', '\U', and '\L' substitution sequences work with multibyte * The '\u', '\l', '\U', and '\L' substitution sequences work with multibyte
characters now. characters now.
* Handle character case conversions with the '~' vi command correctly if the * Handle character case conversions with the '~' vi command correctly if the

View File

@ -70,12 +70,12 @@
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Sccsid @(#)ex_version.c 1.110 (gritter) 1/9/05 * Sccsid @(#)ex_version.c 1.111 (gritter) 1/10/05
*/ */
#include "ex.h" #include "ex.h"
static char *versionstring = "@(#)Version 4.0 (gritter) 1/9/05"; static char *versionstring = "@(#)Version 4.0 (gritter) 1/10/05";
void void
printver(void) printver(void)

View File

@ -73,7 +73,7 @@
#ifndef lint #ifndef lint
#ifdef DOSCCS #ifdef DOSCCS
static char sccsid[] = "@(#)ex_vput.c 1.34 (gritter) 1/2/05"; static char sccsid[] = "@(#)ex_vput.c 1.35 (gritter) 1/10/05";
#endif #endif
#endif #endif
@ -623,12 +623,6 @@ vinschar(int c)
} }
return c; return c;
} }
insmc0 = 0;
#ifdef MB
while (inscol+insmc0 < LBSIZE &&
(vtube0[inscol+insmc0]&(MULTICOL|TRIM)) == MULTICOL)
insmc0++;
#endif /* MB */
insmc1 = colsc(c) - 1; insmc1 = colsc(c) - 1;
/* /*
* Compute the number of positions in the line image of the * Compute the number of positions in the line image of the
@ -659,6 +653,16 @@ vinschar(int c)
* of the output cursor. * of the output cursor.
*/ */
inscol = destcol + (destline - LINE(vcline)) * WCOLS; inscol = destcol + (destline - LINE(vcline)) * WCOLS;
insmc0 = 0;
#ifdef MB
i = 0;
while (inscol+i < LBSIZE && vtube0[inscol+i]&MULTICOL &&
(vtube0[inscol+insmc0+i]&(MULTICOL|TRIM)) != MULTICOL)
i++;
while (inscol+insmc0+i < LBSIZE &&
(vtube0[inscol+insmc0+i]&(MULTICOL|TRIM)) == MULTICOL)
insmc0++;
#endif /* MB */
if (c == '\t') { if (c == '\t') {
/* /*
* Characters inserted from a tab must be * Characters inserted from a tab must be