From 630afe889a2a02b367ea8eaaa48e66ed81e77ff3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 28 Jun 2018 19:26:28 +0200 Subject: 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. --- src/macros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/macros.h') diff --git a/src/macros.h b/src/macros.h index fcd1a829da..c91b4b6205 100644 --- a/src/macros.h +++ b/src/macros.h @@ -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 -- cgit v1.2.3