Mercurial > vim
diff src/misc1.c @ 1023:cb7043482eca v7.0.149
updated for version 7.0-149
author | vimboss |
---|---|
date | Tue, 24 Oct 2006 19:12:40 +0000 |
parents | ba32a005373a |
children | 83eda510dbc0 |
line wrap: on
line diff
--- a/src/misc1.c +++ b/src/misc1.c @@ -1761,15 +1761,13 @@ plines_win_col(wp, lnum, column) * Add column offset for 'number', 'foldcolumn', etc. */ width = W_WIDTH(wp) - win_col_off(wp); - if (width > 0) - { - lines += 1; - if (col >= width) - lines += (col - width) / (width + win_col_off2(wp)); - if (lines <= wp->w_height) - return lines; - } - return (int)(wp->w_height); /* maximum length */ + if (width <= 0) + return 9999; + + lines += 1; + if (col > width) + lines += (col - width) / (width + win_col_off2(wp)) + 1; + return lines; } int