tweaks: remove two pairs of unneeded braces, and normalize a line

This commit is contained in:
Benno Schulenberg 2024-02-18 15:02:51 +01:00
parent 190221c91c
commit eca5856d99
3 changed files with 4 additions and 6 deletions

View File

@ -98,10 +98,10 @@ bool is_blank_char(const char *c)
bool is_cntrl_char(const char *c)
{
#ifdef ENABLE_UTF8
if (use_utf8) {
if (use_utf8)
return ((c[0] & 0xE0) == 0 || c[0] == DEL_CODE ||
((signed char)c[0] == -62 && (signed char)c[1] < -96));
} else
else
#endif
return ((*c & 0x60) == 0 || *c == DEL_CODE);
}

View File

@ -1849,9 +1849,8 @@ void justify_text(bool whole_buffer)
{
/* When justifying the entire buffer, start at the top. Otherwise, when
* in a paragraph but not at its beginning, move back to its first line. */
if (whole_buffer) {
if (whole_buffer)
openfile->current = openfile->filetop;
}
else if (inpar(openfile->current) && !begpar(openfile->current, 0))
do_para_begin(&openfile->current);

View File

@ -721,8 +721,7 @@ int convert_CSI_sequence(const int *seq, size_t length, int *consumed)
if (seq[2] == '3')
return ALT_INSERT;
#endif
}
else if (length > 4 && seq[2] == ';' && seq[4] == '~')
} else if (length > 4 && seq[2] == ';' && seq[4] == '~')
/* Esc [ 2 n ; 2 ~ == F21...F24 on some terminals. */
*consumed = 5;
#ifndef NANO_TINY