linter: fix issues

This commit is contained in:
Marco Hinz
2019-01-25 16:31:59 +01:00
parent df5534f576
commit 2418aa3a4a
7 changed files with 78 additions and 66 deletions

View File

@@ -1282,12 +1282,11 @@ int plines_win_nofold(win_T *wp, linenr_T lnum)
return 1;
col = win_linetabsize(wp, s, (colnr_T)MAXCOL);
/*
* If list mode is on, then the '$' at the end of the line may take up one
* extra column.
*/
if (wp->w_p_list && wp->w_p_lcs_chars.eol != NUL)
// If list mode is on, then the '$' at the end of the line may take up one
// extra column.
if (wp->w_p_list && wp->w_p_lcs_chars.eol != NUL) {
col += 1;
}
/*
* Add column offset for 'number', 'relativenumber' and 'foldcolumn'.
@@ -1336,7 +1335,8 @@ int plines_win_col(win_T *wp, linenr_T lnum, long column)
// screen position of the TAB. This only fixes an error when the TAB wraps
// from one screen line to the next (when 'columns' is not a multiple of
// 'ts') -- webb.
if (*s == TAB && (State & NORMAL) && (!wp->w_p_list || wp->w_p_lcs_chars.tab1)) {
if (*s == TAB && (State & NORMAL)
&& (!wp->w_p_list || wp->w_p_lcs_chars.tab1)) {
col += win_lbr_chartabsize(wp, line, s, col, NULL) - 1;
}