refactor: follow style guide

This commit is contained in:
dundargoc
2023-12-28 13:42:24 +01:00
committed by dundargoc
parent d634cd5b0b
commit c89292fcb7
90 changed files with 953 additions and 1121 deletions

View File

@@ -187,7 +187,7 @@ static void call_click_def_func(StlClickDefinition *click_defs, int col, int whi
}
};
typval_T rettv;
(void)call_vim_function(click_defs[col].func, ARRAY_SIZE(argv), argv, &rettv);
call_vim_function(click_defs[col].func, ARRAY_SIZE(argv), argv, &rettv);
tv_clear(&rettv);
// Make sure next click does not register as drag when callback absorbs the release event.
got_click = false;
@@ -1010,7 +1010,7 @@ void do_mousescroll(cmdarg_T *cap)
// Vertical scrolling
if ((State & MODE_NORMAL) && shift_or_ctrl) {
// whole page up or down
(void)onepage(cap->arg ? FORWARD : BACKWARD, 1);
onepage(cap->arg ? FORWARD : BACKWARD, 1);
} else {
if (shift_or_ctrl) {
// whole page up or down
@@ -1030,7 +1030,7 @@ void do_mousescroll(cmdarg_T *cap)
if (leftcol < 0) {
leftcol = 0;
}
(void)do_mousescroll_horiz(leftcol);
do_mousescroll_horiz(leftcol);
}
}
@@ -1416,7 +1416,7 @@ retnomove:
break;
}
first = false;
(void)hasFolding(curwin->w_topline, &curwin->w_topline, NULL);
hasFolding(curwin->w_topline, &curwin->w_topline, NULL);
if (curwin->w_topfill < win_get_fill(curwin, curwin->w_topline)) {
curwin->w_topfill++;
} else {
@@ -1577,7 +1577,7 @@ void nv_mousescroll(cmdarg_T *cap)
/// Mouse clicks and drags.
void nv_mouse(cmdarg_T *cap)
{
(void)do_mouse(cap->oap, cap->cmdchar, BACKWARD, cap->count1, 0);
do_mouse(cap->oap, cap->cmdchar, BACKWARD, cap->count1, 0);
}
/// Compute the position in the buffer line from the posn on the screen in
@@ -1626,7 +1626,7 @@ bool mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump)
break; // Position is in this buffer line.
}
(void)hasFoldingWin(win, lnum, NULL, &lnum, true, NULL);
hasFoldingWin(win, lnum, NULL, &lnum, true, NULL);
if (lnum == win->w_buffer->b_ml.ml_line_count) {
retval = true;
@@ -1939,7 +1939,7 @@ void f_getmousepos(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
winrow = row + 1 + wp->w_winrow_off; // Adjust by 1 for top border
wincol = col + 1 + wp->w_wincol_off; // Adjust by 1 for left border
if (row >= 0 && row < wp->w_height && col >= 0 && col < wp->w_width) {
(void)mouse_comp_pos(wp, &row, &col, &lnum);
mouse_comp_pos(wp, &row, &col, &lnum);
col = vcol2col(wp, lnum, col, &coladd);
column = col + 1;
}