Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
12514:55f1b7ff0467 | 12515:972ea22c946f |
---|---|
2664 else | 2664 else |
2665 #endif | 2665 #endif |
2666 ++col; | 2666 ++col; |
2667 } | 2667 } |
2668 curwin->w_wrow = curwin->w_cline_row | 2668 curwin->w_wrow = curwin->w_cline_row |
2669 + curwin->w_wcol / W_WIDTH(curwin); | 2669 + curwin->w_wcol / curwin->w_width; |
2670 curwin->w_wcol %= W_WIDTH(curwin); | 2670 curwin->w_wcol %= curwin->w_width; |
2671 curwin->w_wcol += curwin_col_off(); | 2671 curwin->w_wcol += curwin_col_off(); |
2672 #ifdef FEAT_MBYTE | 2672 #ifdef FEAT_MBYTE |
2673 col = 0; /* no correction needed */ | 2673 col = 0; /* no correction needed */ |
2674 #endif | 2674 #endif |
2675 } | 2675 } |
2682 } | 2682 } |
2683 } | 2683 } |
2684 else if (curwin->w_p_wrap && curwin->w_wrow) | 2684 else if (curwin->w_p_wrap && curwin->w_wrow) |
2685 { | 2685 { |
2686 --curwin->w_wrow; | 2686 --curwin->w_wrow; |
2687 curwin->w_wcol = W_WIDTH(curwin) - 1; | 2687 curwin->w_wcol = curwin->w_width - 1; |
2688 #ifdef FEAT_MBYTE | 2688 #ifdef FEAT_MBYTE |
2689 col = curwin->w_cursor.col - 1; | 2689 col = curwin->w_cursor.col - 1; |
2690 #endif | 2690 #endif |
2691 } | 2691 } |
2692 #ifdef FEAT_MBYTE | 2692 #ifdef FEAT_MBYTE |