Skip to content

fix: Return the correct indent when shiftwidth==0 #137

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

Merged
merged 1 commit into from
Nov 27, 2022

Conversation

cljoly
Copy link
Contributor

@cljoly cljoly commented Nov 26, 2022

Currently, when 'shiftwidth' is set to 0, GetLedgerIndent always returns
0, making it very ineffective.

But when 'shiftwidth' is set to 0, vim falls back to 'tabstop'. The help
entry of 'shiftwidth' recommends to use the shiftwidth function to get
the effective value of 'shiftwidth', which is what this fix does.

Currently, when 'shiftwidth' is set to 0, GetLedgerIndent always returns
0, making it very ineffective.

But when 'shiftwidth' is set to 0, vim falls back to 'tabstop'. The help
entry of 'shiftwidth' recommends to use the shiftwidth function to get
the effective value of 'shiftwidth', which is what this fix does.
Copy link
Member

@alerque alerque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracking this down and taking the time to contribute. LGTM.

@alerque alerque merged commit b7fda15 into ledger:master Nov 27, 2022
@cljoly
Copy link
Contributor Author

cljoly commented Nov 27, 2022

You are welcome, thanks for all the work maintaining this plugin!

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