Skip to content

Commit

Permalink
Do not align when number starts at first column.
Browse files Browse the repository at this point in the history
  • Loading branch information
lifepillar committed Apr 29, 2017
1 parent 9850f4d commit d9ea62e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions autoload/ledger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,7 @@ endf
function! ledger#autocomplete_and_align()
if pumvisible()
return "\<c-n>"
" See http://stackoverflow.com/questions/23323747/vim-vimscript-get-exact-character-under-the-cursor
elseif matchstr(getline('.'), '\%' . (col('.')-1) . 'c.') =~ '\d'
elseif match(getline('.'), '\s.*\d\%'.col('.').'c') > -1
norm h
call ledger#align_amount_at_cursor()
return "\<c-o>A"
Expand Down

0 comments on commit d9ea62e

Please sign in to comment.