Skip to content

Commit

Permalink
Align currency with no decimal point correctly (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGibb authored Jul 15, 2024
1 parent 7b97c87 commit dbc683e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autoload/ledger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,10 @@ function! ledger#align_commodity() abort
endif
if pos < 0
" Find the position after the first digits
let pos = matchend(rhs, '\m\d[^[:space:]]*')
let pos = matchend(rhs, '\m\d[^[:space:]]*') - 1
if pos >= 0
let pos = strchars(rhs[:pos])
endif
endif
" Go to the column that allows us to align the decimal separator at g:ledger_align_at:
if pos >= 0
Expand Down

0 comments on commit dbc683e

Please sign in to comment.