fix: Make g:ledger_is_hledger set correctly#176
Open
Lense wants to merge 1 commit intoledger:masterfrom
Open
Conversation
Member
|
Your testing chart and the code change don't add up. Something else is going on. The code change is only relevant to if you have the ledger_is_hledger value manually set but have an unset value for the bin. How are you ending up with ledger_bin being unset? |
Author
|
This script recreates the truth tables with no vim config and no ledger binaries in the PATH: #!/bin/sh
truthtable() {
for ledger in ledger hledger ""; do
for ishledger in 0 1 ""; do
/bin/echo "set: g:ledger_bin=$ledger and g:ledger_is_hledger=$ishledger";
/bin/vim --clean -c "let g:ledger_bin=$ledger" -c "let g:ledger_is_hledger=$ishledger" -c "source autoload/ledger.vim" -c "sil exe '!/bin/echo result: g:ledger_bin=' .
g:ledger_bin . ' and g:ledger_is_hledger=' . g:ledger_is_hledger" -c q
done
done
}
/bin/git checkout 6d12e23e7261342f9dd4a23b9dd3a504454df002
/bin/echo patch not applied
PATH=
truthtable
/bin/git checkout a49ef3fbd49a7af124f04112e3292eee4e67110a
/bin/echo patch applied
truthtable My output: Note in particular the lines
|
|
I am affected by this. ("Fixed" it for my by removing Assume " if exists('g:ledger_bin') && !exists('g:ledger_is_hledger')
" if v:true && !v:true
if v:false
let g:ledger_is_hledger = g:ledger_bin =~# '.*hledger'
else
let g:ledger_is_hledger = 0
endif(It also took me a bit 😅 ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #175
Before commit:
After commit: