(pprint-newline :fill) is not handled correctly

Description

Filled pretty printing (where we try to fit as many elements on a line as possible) is being too aggressive as we can see when we try to print the following array:

user> (binding [print-right-margin 20] (pprint (int-array (range 10))))

Produces:

[0,
1,
2,
3,
4, 5, 6, 7, 8, 9]

Rather than

[0, 1, 2, 3, 4,
5, 6, 7, 8, 9]

or something like that. (I haven't worked through the exact correct representation for this case).

We currently only use :fill style newlines for native java arrays.

Environment

None

Status

Assignee

Tom Faulhaber

Reporter

import

Labels

Approval

Vetted

Patch

None

Fix versions

Priority

Minor
Configure