Mercurial > vim
comparison src/ui.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 | 3ca08bf99396 |
children | f62696bd1a9f |
comparison
equal
deleted
inserted
replaced
12514:55f1b7ff0467 | 12515:972ea22c946f |
---|---|
2737 && (wp->w_buffer != curwin->w_buffer | 2737 && (wp->w_buffer != curwin->w_buffer |
2738 || (!on_status_line && !on_sep_line | 2738 || (!on_status_line && !on_sep_line |
2739 #ifdef FEAT_FOLDING | 2739 #ifdef FEAT_FOLDING |
2740 && ( | 2740 && ( |
2741 # ifdef FEAT_RIGHTLEFT | 2741 # ifdef FEAT_RIGHTLEFT |
2742 wp->w_p_rl ? col < W_WIDTH(wp) - wp->w_p_fdc : | 2742 wp->w_p_rl ? col < wp->w_width - wp->w_p_fdc : |
2743 # endif | 2743 # endif |
2744 col >= wp->w_p_fdc | 2744 col >= wp->w_p_fdc |
2745 # ifdef FEAT_CMDWIN | 2745 # ifdef FEAT_CMDWIN |
2746 + (cmdwin_type == 0 && wp == curwin ? 0 : 1) | 2746 + (cmdwin_type == 0 && wp == curwin ? 0 : 1) |
2747 # endif | 2747 # endif |
2943 | 2943 |
2944 #ifdef FEAT_FOLDING | 2944 #ifdef FEAT_FOLDING |
2945 /* Check for position outside of the fold column. */ | 2945 /* Check for position outside of the fold column. */ |
2946 if ( | 2946 if ( |
2947 # ifdef FEAT_RIGHTLEFT | 2947 # ifdef FEAT_RIGHTLEFT |
2948 curwin->w_p_rl ? col < W_WIDTH(curwin) - curwin->w_p_fdc : | 2948 curwin->w_p_rl ? col < curwin->w_width - curwin->w_p_fdc : |
2949 # endif | 2949 # endif |
2950 col >= curwin->w_p_fdc | 2950 col >= curwin->w_p_fdc |
2951 # ifdef FEAT_CMDWIN | 2951 # ifdef FEAT_CMDWIN |
2952 + (cmdwin_type == 0 ? 0 : 1) | 2952 + (cmdwin_type == 0 ? 0 : 1) |
2953 # endif | 2953 # endif |
3018 int off; | 3018 int off; |
3019 int count; | 3019 int count; |
3020 | 3020 |
3021 #ifdef FEAT_RIGHTLEFT | 3021 #ifdef FEAT_RIGHTLEFT |
3022 if (win->w_p_rl) | 3022 if (win->w_p_rl) |
3023 col = W_WIDTH(win) - 1 - col; | 3023 col = win->w_width - 1 - col; |
3024 #endif | 3024 #endif |
3025 | 3025 |
3026 lnum = win->w_topline; | 3026 lnum = win->w_topline; |
3027 | 3027 |
3028 while (row > 0) | 3028 while (row > 0) |
3062 { | 3062 { |
3063 /* Compute the column without wrapping. */ | 3063 /* Compute the column without wrapping. */ |
3064 off = win_col_off(win) - win_col_off2(win); | 3064 off = win_col_off(win) - win_col_off2(win); |
3065 if (col < off) | 3065 if (col < off) |
3066 col = off; | 3066 col = off; |
3067 col += row * (W_WIDTH(win) - off); | 3067 col += row * (win->w_width - off); |
3068 /* add skip column (for long wrapping line) */ | 3068 /* add skip column (for long wrapping line) */ |
3069 col += win->w_skipcol; | 3069 col += win->w_skipcol; |
3070 } | 3070 } |
3071 | 3071 |
3072 if (!win->w_p_wrap) | 3072 if (!win->w_p_wrap) |