mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 18:06:30 +00:00
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:
@@ -378,12 +378,12 @@ int grid_line_puts(int col, const char *text, int textlen, int attr)
|
||||
while (col < max_col && (len < 0 || (int)(ptr - text) < len) && *ptr != NUL) {
|
||||
// check if this is the first byte of a multibyte
|
||||
int mbyte_blen = len > 0
|
||||
? utfc_ptr2len_len(ptr, (int)((text + len) - ptr))
|
||||
: utfc_ptr2len(ptr);
|
||||
? utfc_ptr2len_len(ptr, (int)((text + len) - ptr))
|
||||
: utfc_ptr2len(ptr);
|
||||
int firstc;
|
||||
schar_T schar = len >= 0
|
||||
? utfc_ptr2schar_len(ptr, (int)((text + len) - ptr), &firstc)
|
||||
: utfc_ptr2schar(ptr, &firstc);
|
||||
? utfc_ptr2schar_len(ptr, (int)((text + len) - ptr), &firstc)
|
||||
: utfc_ptr2schar(ptr, &firstc);
|
||||
int mbyte_cells = utf_char2cells(firstc);
|
||||
if (mbyte_cells > 2) {
|
||||
mbyte_cells = 1;
|
||||
|
Reference in New Issue
Block a user