comparison src/macros.h @ 14216:12bdbf9f7e20 v8.1.0125

patch 8.1.0125: virtual edit replace with multi-byte fails at end of line commit https://github.com/vim/vim/commit/630afe889a2a02b367ea8eaaa48e66ed81e77ff3 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 28 19:26:28 2018 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Thu, 28 Jun 2018 19:30:07 +0200
parents cec5137d5332
children 0a69e6e708f9
comparison
equal deleted inserted replaced
14215:b0083bebf159 14216:12bdbf9f7e20
12 * Macros should be ALL_CAPS. An exception is for where a function is 12 * Macros should be ALL_CAPS. An exception is for where a function is
13 * replaced and an argument is not used more than once. 13 * replaced and an argument is not used more than once.
14 */ 14 */
15 15
16 /* 16 /*
17 * PCHAR(lp, c) - put character 'c' at position 'lp' 17 * PBYTE(lp, c) - put byte 'c' at position 'lp'
18 */ 18 */
19 #define PCHAR(lp, c) (*(ml_get_buf(curbuf, (lp).lnum, TRUE) + (lp).col) = (c)) 19 #define PBYTE(lp, c) (*(ml_get_buf(curbuf, (lp).lnum, TRUE) + (lp).col) = (c))
20 20
21 /* 21 /*
22 * Position comparisons 22 * Position comparisons
23 */ 23 */
24 #ifdef FEAT_VIRTUALEDIT 24 #ifdef FEAT_VIRTUALEDIT