**Describe the unexpected behaviour**
```
milovidov-desktop :) SET output_format_pretty_row_numbers = 1

SET output_format_pretty_row_numbers = 1

Query id: bb15ca27-5a3c-48ac-814a-a3cfea42deda

Ok.

0 rows in set. Elapsed: 0.000 sec. 

milovidov-desktop :) SELECT 1 UNION ALL SELECT 2

SELECT 1
UNION ALL
SELECT 2

Query id: d940f566-7188-4d17-83d6-8421975791a9

   ┌─1─┐
1. │ 2 │
   └───┘
   ┌─1─┐
1. │ 1 │
   └───┘

2 rows in set. Elapsed: 0.001 sec.
```
size_t row_num,
    const Block & header,
    const Columns & columns,
    const WidthsPerColumn & widths,
    const Widths & max_widths)
{
    if (format_settings.pretty.output_format_pretty_row_numbers)
    {
        // Write row number;
        auto row_num_string = std::to_string(row_num + 1) + ". ";
        for (size_t i = 0; i < row_number_width - row_num_string.size(); ++i)
        {
            wrg(" ", out);
        }
        writeString(row_num_string, out);
    }
    const GridSymbols & grid_symbols = format_settings.pretty.charset == FormatSettings::Pretty::Charset::UTF8 ?
                                       utf8_grid_symbols :
                                       ascii_grid_symbols;
    size_t num_columns = max_widths.size();
    wrg(grid_symbols.bar, out);
    for (size_t j = 0; j < num_columns; ++j)
    {
        if (j != 0)