comparison src/screen.c @ 1883:c8f343a465a2 v7.2.180

updated for version 7.2-180
author vimboss
date Sun, 17 May 2009 11:33:22 +0000
parents 720a59d79bcd
children ff9ecf14efe3
comparison
equal deleted inserted replaced
1882:c8b87fa14d27 1883:c8f343a465a2
268 * Used when entering/leaving Insert mode with the cursor on a folded line. 268 * Used when entering/leaving Insert mode with the cursor on a folded line.
269 * Used to remove the "$" from a change command. 269 * Used to remove the "$" from a change command.
270 * Note that when also inserting/deleting lines w_redraw_top and w_redraw_bot 270 * Note that when also inserting/deleting lines w_redraw_top and w_redraw_bot
271 * may become invalid and the whole window will have to be redrawn. 271 * may become invalid and the whole window will have to be redrawn.
272 */ 272 */
273 /*ARGSUSED*/
274 void 273 void
275 redrawWinline(lnum, invalid) 274 redrawWinline(lnum, invalid)
276 linenr_T lnum; 275 linenr_T lnum;
277 int invalid; /* window line height is invalid now */ 276 int invalid UNUSED; /* window line height is invalid now */
278 { 277 {
279 #ifdef FEAT_FOLDING 278 #ifdef FEAT_FOLDING
280 int i; 279 int i;
281 #endif 280 #endif
282 281
2411 || (lnum == top->lnum 2410 || (lnum == top->lnum
2412 && top->col == 0)) 2411 && top->col == 0))
2413 && (lnume < bot->lnum 2412 && (lnume < bot->lnum
2414 || (lnume == bot->lnum 2413 || (lnume == bot->lnum
2415 && (bot->col - (*p_sel == 'e')) 2414 && (bot->col - (*p_sel == 'e'))
2416 >= STRLEN(ml_get_buf(wp->w_buffer, lnume, FALSE))))))) 2415 >= (colnr_T)STRLEN(ml_get_buf(wp->w_buffer, lnume, FALSE)))))))
2417 { 2416 {
2418 if (VIsual_mode == Ctrl_V) 2417 if (VIsual_mode == Ctrl_V)
2419 { 2418 {
2420 /* Visual block mode: highlight the chars part of the block */ 2419 /* Visual block mode: highlight the chars part of the block */
2421 if (wp->w_old_cursor_fcol + txtcol < (colnr_T)W_WIDTH(wp)) 2420 if (wp->w_old_cursor_fcol + txtcol < (colnr_T)W_WIDTH(wp))
2547 * Start at row "startrow", stop when "endrow" is reached. 2546 * Start at row "startrow", stop when "endrow" is reached.
2548 * wp->w_virtcol needs to be valid. 2547 * wp->w_virtcol needs to be valid.
2549 * 2548 *
2550 * Return the number of last row the line occupies. 2549 * Return the number of last row the line occupies.
2551 */ 2550 */
2552 /* ARGSUSED */
2553 static int 2551 static int
2554 win_line(wp, lnum, startrow, endrow, nochange) 2552 win_line(wp, lnum, startrow, endrow, nochange)
2555 win_T *wp; 2553 win_T *wp;
2556 linenr_T lnum; 2554 linenr_T lnum;
2557 int startrow; 2555 int startrow;
2558 int endrow; 2556 int endrow;
2559 int nochange; /* not updating for changed text */ 2557 int nochange UNUSED; /* not updating for changed text */
2560 { 2558 {
2561 int col; /* visual column on screen */ 2559 int col; /* visual column on screen */
2562 unsigned off; /* offset in ScreenLines/ScreenAttrs */ 2560 unsigned off; /* offset in ScreenLines/ScreenAttrs */
2563 int c = 0; /* init for GCC */ 2561 int c = 0; /* init for GCC */
2564 long vcol = 0; /* virtual column (for tabs) */ 2562 long vcol = 0; /* virtual column (for tabs) */
6096 buf, sizeof(buf), 6094 buf, sizeof(buf),
6097 p, use_sandbox, 6095 p, use_sandbox,
6098 fillchar, maxwidth, hltab, tabtab); 6096 fillchar, maxwidth, hltab, tabtab);
6099 len = (int)STRLEN(buf); 6097 len = (int)STRLEN(buf);
6100 6098
6101 while (width < maxwidth && len < sizeof(buf) - 1) 6099 while (width < maxwidth && len < (int)sizeof(buf) - 1)
6102 { 6100 {
6103 #ifdef FEAT_MBYTE 6101 #ifdef FEAT_MBYTE
6104 len += (*mb_char2bytes)(fillchar, buf + len); 6102 len += (*mb_char2bytes)(fillchar, buf + len);
6105 #else 6103 #else
6106 buf[len++] = fillchar; 6104 buf[len++] = fillchar;
8653 * When scrolling region used 'off' is the offset from the top for the region. 8651 * When scrolling region used 'off' is the offset from the top for the region.
8654 * 'row' and 'end' are relative to the start of the region. 8652 * 'row' and 'end' are relative to the start of the region.
8655 * 8653 *
8656 * Return OK for success, FAIL if the lines are not deleted. 8654 * Return OK for success, FAIL if the lines are not deleted.
8657 */ 8655 */
8658 /*ARGSUSED*/
8659 int 8656 int
8660 screen_del_lines(off, row, line_count, end, force, wp) 8657 screen_del_lines(off, row, line_count, end, force, wp)
8661 int off; 8658 int off;
8662 int row; 8659 int row;
8663 int line_count; 8660 int line_count;
8664 int end; 8661 int end;
8665 int force; /* even when line_count > p_ttyscroll */ 8662 int force; /* even when line_count > p_ttyscroll */
8666 win_T *wp; /* NULL or window to use width from */ 8663 win_T *wp UNUSED; /* NULL or window to use width from */
8667 { 8664 {
8668 int j; 8665 int j;
8669 int i; 8666 int i;
8670 unsigned temp; 8667 unsigned temp;
8671 int cursor_row; 8668 int cursor_row;