refactor: enable formatting for ternaries

This requires removing the "Inner expression should be aligned" rule
from clint as it prevents essentially any formatting regarding ternary
operators.
This commit is contained in:
dundargoc
2023-11-16 10:59:11 +01:00
committed by dundargoc
parent ec79ff893d
commit a6e3d93421
59 changed files with 318 additions and 377 deletions

View File

@@ -479,16 +479,17 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
goto theend;
}
#if defined(UNIX) && defined(EOVERFLOW)
filemess(curbuf, sfname, ((fd == UV_EFBIG) ? _("[File too big]") :
filemess(curbuf, sfname, ((fd == UV_EFBIG) ? _("[File too big]")
:
// libuv only returns -errno
// in Unix and in Windows
// open() does not set
// EOVERFLOW
(fd == -EOVERFLOW) ? _("[File too big]") :
_("[Permission Denied]")), 0);
(fd == -EOVERFLOW) ? _("[File too big]")
: _("[Permission Denied]")), 0);
#else
filemess(curbuf, sfname, ((fd == UV_EFBIG) ? _("[File too big]") :
_("[Permission Denied]")), 0);
filemess(curbuf, sfname, ((fd == UV_EFBIG) ? _("[File too big]")
: _("[Permission Denied]")), 0);
#endif
curbuf->b_p_ro = true; // must use "w!" now