Skip to content

Use strdisplaywidth() to calculate foldtext width#84

Merged
alerque merged 1 commit intoledger:masterfrom
ropery:master
Oct 8, 2019
Merged

Use strdisplaywidth() to calculate foldtext width#84
alerque merged 1 commit intoledger:masterfrom
ropery:master

Conversation

@ropery
Copy link
Copy Markdown
Contributor

@ropery ropery commented Sep 10, 2019

Fixes issue #82, which was filed two weeks ago by myself.

The s:multibyte_strlen custom function should be removed too, having no more any user.

Note I have no experience with vim-script.
My approach here isn't clever, but I hope is rather straightforward.
I have tested with let g:ledger_fillstring = "xyz", with narrow windows, and with very long amounts.
One possible concern might be performance, as the while loops are pretty dumb.

@alerque
Copy link
Copy Markdown
Member

alerque commented Oct 6, 2019

I'm sorry this has gone un-reviewed. I missed in in the shuffle somewhere.

@alerque alerque self-assigned this Oct 6, 2019
@alerque alerque self-requested a review October 6, 2019 06:18
@alerque
Copy link
Copy Markdown
Member

alerque commented Oct 8, 2019

I'm having a little trouble testing this. Neither this branch nor the current master are showing the amount field in the fold at all! I don't usually use folds so I might be doing something wrong...

Scratch that. I had unset all my ledger related options for testing this with the default new users will get. That included g:ledger_maxwidth, and my terminal was so big I wasn't even noticing the amount in the far right edge because I was expecting it at my usual width. Embarrassing.

@alerque alerque merged commit 2dbe0ea into ledger:master Oct 8, 2019
@alerque
Copy link
Copy Markdown
Member

alerque commented Oct 8, 2019

Thank you for bot the issue report and the contribution to fix it @lolilolicon!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants