Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoresize doesn't take newlines into account #848

Open
hseg opened this issue Oct 2, 2023 · 3 comments
Open

Autoresize doesn't take newlines into account #848

hseg opened this issue Oct 2, 2023 · 3 comments

Comments

@hseg
Copy link

hseg commented Oct 2, 2023

\n is not treated specially when it comes to aa, making it compute much wider (and shorter) values for cell needs in case of multiline string content.

@andmarti1424
Copy link
Owner

@hseg yes. it seems a bug. thanks for reporting it

@andmarti1424
Copy link
Owner

@hseg, do you have a sample file? you have the newline char inside label? your file is a csv?
thanks.

@hseg
Copy link
Author

hseg commented Aug 3, 2024

File is a SC spreadsheet, but this is clearest when manually writing the spreadsheet:

  1. Start a new SC spreadsheet
  2. In cell A0, run <multiline\nstring\nexample
  3. Notice the cell is too small, run aa. This makes the cell 25 characters wide (the width of multiline.string.example.) but still 1 tall, hiding the two other lines of the label

Playing around a little further, it appears that while the width is recognized as part of the format, the height isn't (fh,fl prompt Current format is messages, whereas fj,fk don't). So perhaps these need different semantics?

File is pasted below, for what it's worth

# This data file was generated by the Spreadsheet Calculator Improvised (sc-im)
# You almost certainly shouldn't edit it.

newsheet "Sheet1"
movetosheet "Sheet1"
offscr_sc_cols 0
offscr_sc_rows 0
nb_frozen_rows 0
nb_frozen_cols 0
nb_frozen_screenrows 0
nb_frozen_screencols 0
leftstring A0 = "multiline\nlabel\nexample"
goto A0
movetosheet "Sheet1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants