pos: define MAXCOL to INT_MAX

Partial port of patch v8.1.0953.
Remove useless casts on MAXCOL.
This commit is contained in:
Jan Edmund Lazo
2021-02-23 22:49:57 -05:00
parent ceed85ea43
commit ab5083b5fc
11 changed files with 41 additions and 37 deletions

View File

@@ -2685,8 +2685,9 @@ fwd_word(
while (--count >= 0) {
/* When inside a range of folded lines, move to the last char of the
* last line. */
if (hasFolding(curwin->w_cursor.lnum, NULL, &curwin->w_cursor.lnum))
coladvance((colnr_T)MAXCOL);
if (hasFolding(curwin->w_cursor.lnum, NULL, &curwin->w_cursor.lnum)) {
coladvance(MAXCOL);
}
sclass = cls();
/*
@@ -2803,8 +2804,9 @@ int end_word(long count, int bigword, int stop, int empty)
while (--count >= 0) {
/* When inside a range of folded lines, move to the last char of the
* last line. */
if (hasFolding(curwin->w_cursor.lnum, NULL, &curwin->w_cursor.lnum))
coladvance((colnr_T)MAXCOL);
if (hasFolding(curwin->w_cursor.lnum, NULL, &curwin->w_cursor.lnum)) {
coladvance(MAXCOL);
}
sclass = cls();
if (inc_cursor() == -1)
return FAIL;