diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-08-28 23:43:04 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-08-28 23:43:04 +0200 |
commit | 461d46d8ace1b6950bf2733de9cb2b290453d86d (patch) | |
tree | a592acf9f95e8c60cc396f48ac4bf73656c0846c /src/nvim/diff.c | |
parent | 885ca3b7a60b79feb1d4c9e54265c8b543d4f245 (diff) | |
parent | a2403a0ed9afdfaea7abb5555dbdf555b56eff9a (diff) | |
download | rneovim-461d46d8ace1b6950bf2733de9cb2b290453d86d.tar.gz rneovim-461d46d8ace1b6950bf2733de9cb2b290453d86d.tar.bz2 rneovim-461d46d8ace1b6950bf2733de9cb2b290453d86d.zip |
Merge #8863 'refactor: Remove mb_head_off()'
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 878971a35c..4bfe67c9d3 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -1962,12 +1962,10 @@ bool diff_find_change(win_T *wp, linenr_T lnum, int *startp, int *endp) } } - if (has_mbyte) { - // Move back to first byte of character in both lines (may - // have "nn^" in line_org and "n^ in line_new). - si_org -= (*mb_head_off)(line_org, line_org + si_org); - si_new -= (*mb_head_off)(line_new, line_new + si_new); - } + // Move back to first byte of character in both lines (may + // have "nn^" in line_org and "n^ in line_new). + si_org -= utf_head_off(line_org, line_org + si_org); + si_new -= utf_head_off(line_new, line_new + si_new); if (*startp > si_org) { *startp = si_org; |