mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 05:48:17 +00:00
Remove unnecessary (int) casts and fix style
This commit is contained in:

committed by
Brandon Coleman

parent
7f21665673
commit
18b64c99cc
@@ -151,7 +151,6 @@ int decl(pos_T *lp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
* Return TRUE when 'shell' has "csh" in the tail.
|
* Return TRUE when 'shell' has "csh" in the tail.
|
||||||
*/
|
*/
|
||||||
int csh_like_shell(void)
|
int csh_like_shell(void)
|
||||||
|
@@ -1612,9 +1612,9 @@ static void win_update(win_T *wp)
|
|||||||
* Last line isn't finished: Display "@@@" at the end.
|
* Last line isn't finished: Display "@@@" at the end.
|
||||||
*/
|
*/
|
||||||
screen_fill(wp->w_winrow + wp->w_height - 1,
|
screen_fill(wp->w_winrow + wp->w_height - 1,
|
||||||
wp->w_winrow + wp->w_height,
|
wp->w_winrow + wp->w_height,
|
||||||
(int)W_ENDCOL(wp) - 3, (int)W_ENDCOL(wp),
|
(int)W_ENDCOL(wp) - 3, (int)W_ENDCOL(wp),
|
||||||
'@', '@', hl_attr(HLF_AT));
|
'@', '@', hl_attr(HLF_AT));
|
||||||
set_empty_rows(wp, srow);
|
set_empty_rows(wp, srow);
|
||||||
wp->w_botline = lnum;
|
wp->w_botline = lnum;
|
||||||
} else {
|
} else {
|
||||||
@@ -1706,8 +1706,8 @@ static void win_draw_end(win_T *wp, int c1, int c2, int row, int endrow, hlf_T h
|
|||||||
if (n > wp->w_width)
|
if (n > wp->w_width)
|
||||||
n = wp->w_width;
|
n = wp->w_width;
|
||||||
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
||||||
W_ENDCOL(wp) - n, (int)W_ENDCOL(wp),
|
W_ENDCOL(wp) - n, (int)W_ENDCOL(wp),
|
||||||
' ', ' ', hl_attr(HLF_FC));
|
' ', ' ', hl_attr(HLF_FC));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (draw_signcolumn(wp)) {
|
if (draw_signcolumn(wp)) {
|
||||||
@@ -1718,17 +1718,17 @@ static void win_draw_end(win_T *wp, int c1, int c2, int row, int endrow, hlf_T h
|
|||||||
nn = wp->w_width;
|
nn = wp->w_width;
|
||||||
}
|
}
|
||||||
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
||||||
W_ENDCOL(wp) - nn, (int)W_ENDCOL(wp) - n,
|
W_ENDCOL(wp) - nn, (int)W_ENDCOL(wp) - n,
|
||||||
' ', ' ', hl_attr(HLF_SC));
|
' ', ' ', hl_attr(HLF_SC));
|
||||||
n = nn;
|
n = nn;
|
||||||
}
|
}
|
||||||
|
|
||||||
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
||||||
wp->w_wincol, W_ENDCOL(wp) - 1 - FDC_OFF,
|
wp->w_wincol, W_ENDCOL(wp) - 1 - FDC_OFF,
|
||||||
c2, c2, hl_attr(hl));
|
c2, c2, hl_attr(hl));
|
||||||
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
||||||
W_ENDCOL(wp) - 1 - FDC_OFF, W_ENDCOL(wp) - FDC_OFF,
|
W_ENDCOL(wp) - 1 - FDC_OFF, W_ENDCOL(wp) - FDC_OFF,
|
||||||
c1, c2, hl_attr(hl));
|
c1, c2, hl_attr(hl));
|
||||||
} else {
|
} else {
|
||||||
if (cmdwin_type != 0 && wp == curwin) {
|
if (cmdwin_type != 0 && wp == curwin) {
|
||||||
/* draw the cmdline character in the leftmost column */
|
/* draw the cmdline character in the leftmost column */
|
||||||
@@ -1736,8 +1736,8 @@ static void win_draw_end(win_T *wp, int c1, int c2, int row, int endrow, hlf_T h
|
|||||||
if (n > wp->w_width)
|
if (n > wp->w_width)
|
||||||
n = wp->w_width;
|
n = wp->w_width;
|
||||||
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
||||||
wp->w_wincol, (int)wp->w_wincol + n,
|
wp->w_wincol, wp->w_wincol + n,
|
||||||
cmdwin_type, ' ', hl_attr(HLF_AT));
|
cmdwin_type, ' ', hl_attr(HLF_AT));
|
||||||
}
|
}
|
||||||
if (wp->w_p_fdc > 0) {
|
if (wp->w_p_fdc > 0) {
|
||||||
int nn = n + wp->w_p_fdc;
|
int nn = n + wp->w_p_fdc;
|
||||||
@@ -1746,8 +1746,8 @@ static void win_draw_end(win_T *wp, int c1, int c2, int row, int endrow, hlf_T h
|
|||||||
if (nn > wp->w_width)
|
if (nn > wp->w_width)
|
||||||
nn = wp->w_width;
|
nn = wp->w_width;
|
||||||
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
||||||
wp->w_wincol + n, (int)wp->w_wincol + nn,
|
wp->w_wincol + n, wp->w_wincol + nn,
|
||||||
' ', ' ', hl_attr(HLF_FC));
|
' ', ' ', hl_attr(HLF_FC));
|
||||||
n = nn;
|
n = nn;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1760,14 +1760,14 @@ static void win_draw_end(win_T *wp, int c1, int c2, int row, int endrow, hlf_T h
|
|||||||
nn = wp->w_width;
|
nn = wp->w_width;
|
||||||
}
|
}
|
||||||
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
||||||
wp->w_wincol + n, (int)wp->w_wincol + nn,
|
wp->w_wincol + n, wp->w_wincol + nn,
|
||||||
' ', ' ', hl_attr(HLF_SC));
|
' ', ' ', hl_attr(HLF_SC));
|
||||||
n = nn;
|
n = nn;
|
||||||
}
|
}
|
||||||
|
|
||||||
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
screen_fill(wp->w_winrow + row, wp->w_winrow + endrow,
|
||||||
wp->w_wincol + FDC_OFF, (int)W_ENDCOL(wp),
|
wp->w_wincol + FDC_OFF, (int)W_ENDCOL(wp),
|
||||||
c1, c2, hl_attr(hl));
|
c1, c2, hl_attr(hl));
|
||||||
}
|
}
|
||||||
set_empty_rows(wp, row);
|
set_empty_rows(wp, row);
|
||||||
}
|
}
|
||||||
@@ -2083,8 +2083,8 @@ static void fold_line(win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T
|
|||||||
ScreenAttrs[off + txtcol], hl_attr(HLF_CUC));
|
ScreenAttrs[off + txtcol], hl_attr(HLF_CUC));
|
||||||
}
|
}
|
||||||
|
|
||||||
SCREEN_LINE(row + wp->w_winrow, wp->w_wincol, (int)wp->w_width,
|
SCREEN_LINE(row + wp->w_winrow, wp->w_wincol, wp->w_width,
|
||||||
(int)wp->w_width, FALSE);
|
wp->w_width, FALSE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update w_cline_height and w_cline_folded if the cursor line was
|
* Update w_cline_height and w_cline_folded if the cursor line was
|
||||||
@@ -2862,8 +2862,7 @@ win_line (
|
|||||||
&& lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol
|
&& lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol
|
||||||
&& filler_todo <= 0
|
&& filler_todo <= 0
|
||||||
) {
|
) {
|
||||||
SCREEN_LINE(screen_row, wp->w_wincol, col, -(int)wp->w_width,
|
SCREEN_LINE(screen_row, wp->w_wincol, col, -wp->w_width, wp->w_p_rl);
|
||||||
wp->w_p_rl);
|
|
||||||
/* Pretend we have finished updating the window. Except when
|
/* Pretend we have finished updating the window. Except when
|
||||||
* 'cursorcolumn' is set. */
|
* 'cursorcolumn' is set. */
|
||||||
if (wp->w_p_cuc)
|
if (wp->w_p_cuc)
|
||||||
@@ -3802,8 +3801,7 @@ win_line (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SCREEN_LINE(screen_row, wp->w_wincol, col,
|
SCREEN_LINE(screen_row, wp->w_wincol, col, wp->w_width, wp->w_p_rl);
|
||||||
(int)wp->w_width, wp->w_p_rl);
|
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -4022,7 +4020,7 @@ win_line (
|
|||||||
|| (n_extra != 0 && (c_extra != NUL || *p_extra != NUL)))
|
|| (n_extra != 0 && (c_extra != NUL || *p_extra != NUL)))
|
||||||
) {
|
) {
|
||||||
SCREEN_LINE(screen_row, wp->w_wincol, col - boguscols,
|
SCREEN_LINE(screen_row, wp->w_wincol, col - boguscols,
|
||||||
(int)wp->w_width, wp->w_p_rl);
|
wp->w_width, wp->w_p_rl);
|
||||||
boguscols = 0;
|
boguscols = 0;
|
||||||
++row;
|
++row;
|
||||||
++screen_row;
|
++screen_row;
|
||||||
@@ -4876,8 +4874,8 @@ void win_redr_status(win_T *wp)
|
|||||||
fillchar = fillchar_status(&attr, wp == curwin);
|
fillchar = fillchar_status(&attr, wp == curwin);
|
||||||
else
|
else
|
||||||
fillchar = fillchar_vsep(&attr);
|
fillchar = fillchar_vsep(&attr);
|
||||||
screen_putchar(fillchar, wp->w_winrow + wp->w_height, W_ENDCOL(wp),
|
screen_putchar(fillchar, wp->w_winrow + wp->w_height,
|
||||||
attr);
|
W_ENDCOL(wp), attr);
|
||||||
}
|
}
|
||||||
busy = FALSE;
|
busy = FALSE;
|
||||||
}
|
}
|
||||||
@@ -6766,8 +6764,8 @@ int win_ins_lines(win_T *wp, int row, int line_count, int invalid, int mayclear)
|
|||||||
if (lastrow > Rows)
|
if (lastrow > Rows)
|
||||||
lastrow = Rows;
|
lastrow = Rows;
|
||||||
screen_fill(nextrow - line_count, lastrow - line_count,
|
screen_fill(nextrow - line_count, lastrow - line_count,
|
||||||
wp->w_wincol, (int)W_ENDCOL(wp),
|
wp->w_wincol, (int)W_ENDCOL(wp),
|
||||||
' ', ' ', 0);
|
' ', ' ', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (screen_ins_lines(0, wp->w_winrow + row, line_count, (int)Rows, NULL)
|
if (screen_ins_lines(0, wp->w_winrow + row, line_count, (int)Rows, NULL)
|
||||||
@@ -6853,8 +6851,8 @@ static int win_do_lines(win_T *wp, int row, int line_count, int mayclear, int de
|
|||||||
*/
|
*/
|
||||||
if (row + line_count >= wp->w_height) {
|
if (row + line_count >= wp->w_height) {
|
||||||
screen_fill(wp->w_winrow + row, wp->w_winrow + wp->w_height,
|
screen_fill(wp->w_winrow + row, wp->w_winrow + wp->w_height,
|
||||||
wp->w_wincol, (int)W_ENDCOL(wp),
|
wp->w_wincol, (int)W_ENDCOL(wp),
|
||||||
' ', ' ', 0);
|
' ', ' ', 0);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -242,7 +242,6 @@ enum {
|
|||||||
#define EXMODE_NORMAL 1
|
#define EXMODE_NORMAL 1
|
||||||
#define EXMODE_VIM 2
|
#define EXMODE_VIM 2
|
||||||
|
|
||||||
|
|
||||||
#ifdef NO_EXPANDPATH
|
#ifdef NO_EXPANDPATH
|
||||||
# define gen_expand_wildcards mch_expand_wildcards
|
# define gen_expand_wildcards mch_expand_wildcards
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user