0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.1.0125: virtual edit replace with multi-byte fails at end of line

Problem:    Virtual edit replace with multi-byte fails at end of line. (Lukas
            Werling)
Solution:   use ins_char() to add the character. (Christian Brabandt,
            closes #3114)  Rename PCHAR() to PBYTE() to avoid mistakes like
            this.
This commit is contained in:
Bram Moolenaar
2018-06-28 19:26:28 +02:00
parent d8b37a53bd
commit 630afe889a
4 changed files with 50 additions and 13 deletions

View File

@@ -14,9 +14,9 @@
*/
/*
* PCHAR(lp, c) - put character 'c' at position 'lp'
* PBYTE(lp, c) - put byte 'c' at position 'lp'
*/
#define PCHAR(lp, c) (*(ml_get_buf(curbuf, (lp).lnum, TRUE) + (lp).col) = (c))
#define PBYTE(lp, c) (*(ml_get_buf(curbuf, (lp).lnum, TRUE) + (lp).col) = (c))
/*
* Position comparisons