Mercurial > vim
comparison src/beval.c @ 18251:c8a53c0daeed v8.1.2120
patch 8.1.2120: some MB_ macros are more complicated than necessary
Commit: https://github.com/vim/vim/commit/1614a14901558ca091329315d14a7d5e1b53aa47
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 6 22:00:13 2019 +0200
patch 8.1.2120: some MB_ macros are more complicated than necessary
Problem: Some MB_ macros are more complicated than necessary. (Dominique
Pelle)
Solution: Simplify the macros. Expand inline.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 06 Oct 2019 22:15:04 +0200 |
parents | 74b6674b99fd |
children | c469e1930456 |
comparison
equal
deleted
inserted
replaced
18250:f1d9d3f76c98 | 18251:c8a53c0daeed |
---|---|
90 return FAIL; | 90 return FAIL; |
91 | 91 |
92 lbuf = ml_get_buf(curwin->w_buffer, VIsual.lnum, FALSE); | 92 lbuf = ml_get_buf(curwin->w_buffer, VIsual.lnum, FALSE); |
93 len = epos->col - spos->col; | 93 len = epos->col - spos->col; |
94 if (*p_sel != 'e') | 94 if (*p_sel != 'e') |
95 len += MB_PTR2LEN(lbuf + epos->col); | 95 len += mb_ptr2len(lbuf + epos->col); |
96 lbuf = vim_strnsave(lbuf + spos->col, len); | 96 lbuf = vim_strnsave(lbuf + spos->col, len); |
97 lnum = spos->lnum; | 97 lnum = spos->lnum; |
98 col = spos->col; | 98 col = spos->col; |
99 scol = col; | 99 scol = col; |
100 } | 100 } |