Mercurial > vim
comparison src/screen.c @ 3318:c70c005f61fb v7.3.426
updated for version 7.3.426
Problem: With '$' in 'cpoptions' the $ is not displayed in the first
column.
Solution: Use -1 instead of 0 as a special value. (Hideki Eiraku and
Hirohito Higashi)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 04 Feb 2012 23:35:00 +0100 |
parents | 320cc46d0eb0 |
children | 8332129d9ae8 |
comparison
equal
deleted
inserted
replaced
3317:8d48efa4dc15 | 3318:c70c005f61fb |
---|---|
1635 | 1635 |
1636 /* | 1636 /* |
1637 * When at start of changed lines: May scroll following lines | 1637 * When at start of changed lines: May scroll following lines |
1638 * up or down to minimize redrawing. | 1638 * up or down to minimize redrawing. |
1639 * Don't do this when the change continues until the end. | 1639 * Don't do this when the change continues until the end. |
1640 * Don't scroll when dollar_vcol is non-zero, keep the "$". | 1640 * Don't scroll when dollar_vcol >= 0, keep the "$". |
1641 */ | 1641 */ |
1642 if (lnum == mod_top | 1642 if (lnum == mod_top |
1643 && mod_bot != MAXLNUM | 1643 && mod_bot != MAXLNUM |
1644 && !(dollar_vcol != 0 && mod_bot == mod_top + 1)) | 1644 && !(dollar_vcol >= 0 && mod_bot == mod_top + 1)) |
1645 { | 1645 { |
1646 int old_rows = 0; | 1646 int old_rows = 0; |
1647 int new_rows = 0; | 1647 int new_rows = 0; |
1648 int xtra_rows; | 1648 int xtra_rows; |
1649 linenr_T l; | 1649 linenr_T l; |
1866 wp->w_lines[idx].wl_lnum = lnum; | 1866 wp->w_lines[idx].wl_lnum = lnum; |
1867 wp->w_lines[idx].wl_valid = TRUE; | 1867 wp->w_lines[idx].wl_valid = TRUE; |
1868 if (row > wp->w_height) /* past end of screen */ | 1868 if (row > wp->w_height) /* past end of screen */ |
1869 { | 1869 { |
1870 /* we may need the size of that too long line later on */ | 1870 /* we may need the size of that too long line later on */ |
1871 if (dollar_vcol == 0) | 1871 if (dollar_vcol == -1) |
1872 wp->w_lines[idx].wl_size = plines_win(wp, lnum, TRUE); | 1872 wp->w_lines[idx].wl_size = plines_win(wp, lnum, TRUE); |
1873 ++idx; | 1873 ++idx; |
1874 break; | 1874 break; |
1875 } | 1875 } |
1876 if (dollar_vcol == 0) | 1876 if (dollar_vcol == -1) |
1877 wp->w_lines[idx].wl_size = row - srow; | 1877 wp->w_lines[idx].wl_size = row - srow; |
1878 ++idx; | 1878 ++idx; |
1879 #ifdef FEAT_FOLDING | 1879 #ifdef FEAT_FOLDING |
1880 lnum += fold_count + 1; | 1880 lnum += fold_count + 1; |
1881 #else | 1881 #else |
1988 win_draw_end(wp, i, i, row, row + (int)j, HLF_DED); | 1988 win_draw_end(wp, i, i, row, row + (int)j, HLF_DED); |
1989 row += j; | 1989 row += j; |
1990 } | 1990 } |
1991 #endif | 1991 #endif |
1992 } | 1992 } |
1993 else if (dollar_vcol == 0) | 1993 else if (dollar_vcol == -1) |
1994 wp->w_botline = lnum; | 1994 wp->w_botline = lnum; |
1995 | 1995 |
1996 /* make sure the rest of the screen is blank */ | 1996 /* make sure the rest of the screen is blank */ |
1997 /* put '~'s on rows that aren't part of the file. */ | 1997 /* put '~'s on rows that aren't part of the file. */ |
1998 win_draw_end(wp, '~', ' ', row, wp->w_height, HLF_AT); | 1998 win_draw_end(wp, '~', ' ', row, wp->w_height, HLF_AT); |
2003 #ifdef FEAT_DIFF | 2003 #ifdef FEAT_DIFF |
2004 wp->w_old_topfill = wp->w_topfill; | 2004 wp->w_old_topfill = wp->w_topfill; |
2005 wp->w_old_botfill = wp->w_botfill; | 2005 wp->w_old_botfill = wp->w_botfill; |
2006 #endif | 2006 #endif |
2007 | 2007 |
2008 if (dollar_vcol == 0) | 2008 if (dollar_vcol == -1) |
2009 { | 2009 { |
2010 /* | 2010 /* |
2011 * There is a trick with w_botline. If we invalidate it on each | 2011 * There is a trick with w_botline. If we invalidate it on each |
2012 * change that might modify it, this will cause a lot of expensive | 2012 * change that might modify it, this will cause a lot of expensive |
2013 * calls to plines() in update_topline() each time. Therefore the | 2013 * calls to plines() in update_topline() each time. Therefore the |
3562 char_attr = 0; | 3562 char_attr = 0; |
3563 } | 3563 } |
3564 } | 3564 } |
3565 | 3565 |
3566 /* When still displaying '$' of change command, stop at cursor */ | 3566 /* When still displaying '$' of change command, stop at cursor */ |
3567 if (dollar_vcol != 0 && wp == curwin | 3567 if (dollar_vcol >= 0 && wp == curwin |
3568 && lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol | 3568 && lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol |
3569 #ifdef FEAT_DIFF | 3569 #ifdef FEAT_DIFF |
3570 && filler_todo <= 0 | 3570 && filler_todo <= 0 |
3571 #endif | 3571 #endif |
3572 ) | 3572 ) |