Skip to content

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

Merged
alerque merged 1 commit into
ledger:masterfrom
cljoly:fix-indent
Nov 27, 2022
Merged

fix: Return the correct indent when shiftwidth==0#137
alerque merged 1 commit into
ledger:masterfrom
cljoly:fix-indent

Conversation

@cljoly

@cljoly cljoly commented Nov 26, 2022

Copy link
Copy Markdown
Contributor

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.

@alerque alerque left a comment

Copy link
Copy Markdown
Member

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

cljoly commented Nov 27, 2022

Copy link
Copy Markdown
Contributor Author

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