diff options
author | Michael Brailsford <michael.brailsford@cerner.com> | 2018-01-30 13:05:59 -0600 |
---|---|---|
committer | Michael Brailsford <michael.brailsford@cerner.com> | 2018-02-07 13:46:37 -0600 |
commit | a6136e8b0be70efb42801267d11a9e5edca5e377 (patch) | |
tree | f44af39322acc3f242f592b6dacb568d1165717b /src | |
parent | 2a4c9c6e4573ebeaaf5d30aeb2c8a9ce2ecab0d5 (diff) | |
download | rneovim-a6136e8b0be70efb42801267d11a9e5edca5e377.tar.gz rneovim-a6136e8b0be70efb42801267d11a9e5edca5e377.tar.bz2 rneovim-a6136e8b0be70efb42801267d11a9e5edca5e377.zip |
screen.c: resolve neovim issue #7937
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/screen.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 8a29734025..22cdcc3bef 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3360,10 +3360,11 @@ win_line ( /* Use nextline[] if possible, it has the start of the * next line concatenated. */ - if ((prev_ptr - line) - nextlinecol >= 0) - p = nextline + (prev_ptr - line) - nextlinecol; - else + if ((prev_ptr - line) - nextlinecol >= 0) { + p = nextline + ((prev_ptr - line) - nextlinecol); + } else { p = prev_ptr; + } cap_col -= (int)(prev_ptr - line); size_t tmplen = spell_check(wp, p, &spell_hlf, &cap_col, nochange); assert(tmplen <= INT_MAX); |