Mercurial > vim
diff src/getchar.c @ 12515:972ea22c946f v8.0.1136
patch 8.0.1136: W_WIDTH() is always the same
commit https://github.com/vim/vim/commit/0263146b5dbbb6c120ce2e7720256503b864425d
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 22 15:20:32 2017 +0200
patch 8.0.1136: W_WIDTH() is always the same
Problem: W_WIDTH() is always the same.
Solution: Expand the macro.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 22 Sep 2017 15:30:06 +0200 |
parents | 68d7bc045dbe |
children | 351cf7c67bbe |
line wrap: on
line diff
--- a/src/getchar.c +++ b/src/getchar.c @@ -2666,8 +2666,8 @@ vgetorpeek(int advance) ++col; } curwin->w_wrow = curwin->w_cline_row - + curwin->w_wcol / W_WIDTH(curwin); - curwin->w_wcol %= W_WIDTH(curwin); + + curwin->w_wcol / curwin->w_width; + curwin->w_wcol %= curwin->w_width; curwin->w_wcol += curwin_col_off(); #ifdef FEAT_MBYTE col = 0; /* no correction needed */ @@ -2684,7 +2684,7 @@ vgetorpeek(int advance) else if (curwin->w_p_wrap && curwin->w_wrow) { --curwin->w_wrow; - curwin->w_wcol = W_WIDTH(curwin) - 1; + curwin->w_wcol = curwin->w_width - 1; #ifdef FEAT_MBYTE col = curwin->w_cursor.col - 1; #endif