saulpw / visidata

A terminal spreadsheet multitool for discovering and arranging data
http://visidata.org
GNU General Public License v3.0
7.94k stars 283 forks source link

data doesn't fill available space in multiline mode #2506

Closed scottedwards2000 closed 3 months ago

scottedwards2000 commented 3 months ago

Small description if I set options.default_height =20 for instance and then use multiline model ('v') i get more space per row, but the data still cuts off with "..."

Data to reproduce csv data:

provisioning_trigger,digital_card_art_uri auto_provisioned,https://assets.asdfasfd.com/card-art/combined-image-asset/a74e2cc6-0cb9-464a-a135-bd0f4cd3e159.png auto_provisioned,https://assets.asdfasfd.com/card-art/combined-image-asset/a74e2cc6-0cb9-464a-a135-bd0f4cd3e159.png auto_provisioned,https://assets.asdfasfd.com/card-art/combined-image-asset/a74e2cc6-0cb9-464a-a135-bd0f4cd3e159.png

Steps to reproduce

open file and T (transpose) and v (multiliine)

Expected result

given the extra-high rows, we should be able to see the full url on all columns

Actual result with screenshot

image

[If there is an error message, please include the full stack trace shown with Ctrl+E.]

Configuration

Additional context

saulpw commented 3 months ago

Okay, so this was a deliberate choice to use break_long_words=False in textwrap.wrap(). See https://github.com/saulpw/visidata/blob/develop/visidata/sheets.py#L28.

I've made it so that disp_wrap_ options are passed through to textwrap.wrap(). So now you can add --disp-wrap-break-long-words=True (or set in visidatarc of course), to get the behavior you want. Other options from textwrap are also available.