SQLite Forum

SQLite 3.33.0 beta-1
Login
In `.mode box`, which is very welcome addition, if the field contains multiple lines (line feeds, either with CF/LF or just LF) the format is messed up.

Example:

```
create table t(a,b);
insert into t values('Hello'||char(10)||'World','Hello World');
insert into t values('Two lines','Two'||char(10)||'lines');
.mode box
select * from t;
```

outputs:

```
┌─────────────┬─────────────┐
│      a      │      b      │
├─────────────┼─────────────┤
│ Hello
World │ Hello World │
│ Two lines   │ Two
lines   │
└─────────────┴─────────────┘
```

instead of

```
┌─────────────┬─────────────┐
│      a      │      b      │
├─────────────┼─────────────┤
│ Hello       │ Hello World │
│ World       │             │
│ Two lines   │ Two         │
│             │ lines       │
└─────────────┴─────────────┘
```

In other words, for text affinity fields, I would expect the second line of each field to appear in the same column, and the remaining columns which have no corresponding content to be blank.

If that's not possible for now, how about truncate the content on the line feed character(s), and assume that as its length, and show only the first line followed perhaps by `...` to let one know there's more.

This will at least not mess up the display.