Mercurial > vim
comparison src/screen.c @ 625:81fe2ccc1207 v7.0179
updated for version 7.0179
author | vimboss |
---|---|
date | Thu, 12 Jan 2006 23:22:24 +0000 |
parents | 25a70b1cd2da |
children | c79d4df4686e |
comparison
equal
deleted
inserted
replaced
624:91e7d4a7b3b0 | 625:81fe2ccc1207 |
---|---|
132 #ifdef FEAT_FOLDING | 132 #ifdef FEAT_FOLDING |
133 static void fold_line __ARGS((win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T lnum, int row)); | 133 static void fold_line __ARGS((win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T lnum, int row)); |
134 static void fill_foldcolumn __ARGS((char_u *p, win_T *wp, int closed, linenr_T lnum)); | 134 static void fill_foldcolumn __ARGS((char_u *p, win_T *wp, int closed, linenr_T lnum)); |
135 static void copy_text_attr __ARGS((int off, char_u *buf, int len, int attr)); | 135 static void copy_text_attr __ARGS((int off, char_u *buf, int len, int attr)); |
136 #endif | 136 #endif |
137 static int win_line __ARGS((win_T *, linenr_T, int, int)); | 137 static int win_line __ARGS((win_T *, linenr_T, int, int, int nochange)); |
138 static int char_needs_redraw __ARGS((int off_from, int off_to, int cols)); | 138 static int char_needs_redraw __ARGS((int off_from, int off_to, int cols)); |
139 #ifdef FEAT_RIGHTLEFT | 139 #ifdef FEAT_RIGHTLEFT |
140 static void screen_line __ARGS((int row, int coloff, int endcol, int clear_width, int rlflag)); | 140 static void screen_line __ARGS((int row, int coloff, int endcol, int clear_width, int rlflag)); |
141 # define SCREEN_LINE(r, o, e, c, rl) screen_line((r), (o), (e), (c), (rl)) | 141 # define SCREEN_LINE(r, o, e, c, rl) screen_line((r), (o), (e), (c), (rl)) |
142 #else | 142 #else |
1679 #endif | 1679 #endif |
1680 | 1680 |
1681 /* | 1681 /* |
1682 * Display one line. | 1682 * Display one line. |
1683 */ | 1683 */ |
1684 row = win_line(wp, lnum, srow, wp->w_height); | 1684 row = win_line(wp, lnum, srow, wp->w_height, mod_top == 0); |
1685 | 1685 |
1686 #ifdef FEAT_FOLDING | 1686 #ifdef FEAT_FOLDING |
1687 wp->w_lines[idx].wl_folded = FALSE; | 1687 wp->w_lines[idx].wl_folded = FALSE; |
1688 wp->w_lines[idx].wl_lastlnum = lnum; | 1688 wp->w_lines[idx].wl_lastlnum = lnum; |
1689 #endif | 1689 #endif |
2444 * Start at row "startrow", stop when "endrow" is reached. | 2444 * Start at row "startrow", stop when "endrow" is reached. |
2445 * wp->w_virtcol needs to be valid. | 2445 * wp->w_virtcol needs to be valid. |
2446 * | 2446 * |
2447 * Return the number of last row the line occupies. | 2447 * Return the number of last row the line occupies. |
2448 */ | 2448 */ |
2449 /* ARGSUSED */ | |
2449 static int | 2450 static int |
2450 win_line(wp, lnum, startrow, endrow) | 2451 win_line(wp, lnum, startrow, endrow, nochange) |
2451 win_T *wp; | 2452 win_T *wp; |
2452 linenr_T lnum; | 2453 linenr_T lnum; |
2453 int startrow; | 2454 int startrow; |
2454 int endrow; | 2455 int endrow; |
2456 int nochange; /* not updating for changed text */ | |
2455 { | 2457 { |
2456 int col; /* visual column on screen */ | 2458 int col; /* visual column on screen */ |
2457 unsigned off; /* offset in ScreenLines/ScreenAttrs */ | 2459 unsigned off; /* offset in ScreenLines/ScreenAttrs */ |
2458 int c = 0; /* init for GCC */ | 2460 int c = 0; /* init for GCC */ |
2459 long vcol = 0; /* virtual column (for tabs) */ | 2461 long vcol = 0; /* virtual column (for tabs) */ |
3742 if ((prev_ptr - line) - nextlinecol >= 0) | 3744 if ((prev_ptr - line) - nextlinecol >= 0) |
3743 p = nextline + (prev_ptr - line) - nextlinecol; | 3745 p = nextline + (prev_ptr - line) - nextlinecol; |
3744 else | 3746 else |
3745 p = prev_ptr; | 3747 p = prev_ptr; |
3746 cap_col -= (prev_ptr - line); | 3748 cap_col -= (prev_ptr - line); |
3747 len = spell_check(wp, p, &spell_hlf, &cap_col); | 3749 len = spell_check(wp, p, &spell_hlf, &cap_col, |
3750 nochange); | |
3748 word_end = v + len; | 3751 word_end = v + len; |
3749 | 3752 |
3750 /* In Insert mode only highlight a word that | 3753 /* In Insert mode only highlight a word that |
3751 * doesn't touch the cursor. */ | 3754 * doesn't touch the cursor. */ |
3752 if (spell_hlf != HLF_COUNT | 3755 if (spell_hlf != HLF_COUNT |