mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
refactor: follow style guide
- reduce variable scope - prefer initialization over declaration and assignment
This commit is contained in:
@@ -167,9 +167,7 @@ int lbr_chartabsize(chartabsize_T *cts)
|
||||
/// @return The number of characters take up on the screen.
|
||||
int lbr_chartabsize_adv(chartabsize_T *cts)
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = lbr_chartabsize(cts);
|
||||
int retval = lbr_chartabsize(cts);
|
||||
MB_PTR_ADV(cts->cts_ptr);
|
||||
return retval;
|
||||
}
|
||||
@@ -399,14 +397,13 @@ static int win_nolbr_chartabsize(chartabsize_T *cts, int *headp)
|
||||
win_T *wp = cts->cts_win;
|
||||
char *s = cts->cts_ptr;
|
||||
colnr_T col = cts->cts_vcol;
|
||||
int n;
|
||||
|
||||
if ((*s == TAB) && (!wp->w_p_list || wp->w_p_lcs_chars.tab1)) {
|
||||
return tabstop_padding(col,
|
||||
wp->w_buffer->b_p_ts,
|
||||
wp->w_buffer->b_p_vts_array);
|
||||
}
|
||||
n = ptr2cells(s);
|
||||
int n = ptr2cells(s);
|
||||
|
||||
// Add one cell for a double-width character in the last column of the
|
||||
// window, displayed with a ">".
|
||||
|
Reference in New Issue
Block a user