Skip to content

Commit d9ea62e

Browse files
committed
Do not align when number starts at first column.
1 parent 9850f4d commit d9ea62e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

autoload/ledger.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,7 @@ endf
501501
function! ledger#autocomplete_and_align()
502502
if pumvisible()
503503
return "\<c-n>"
504-
" See http://stackoverflow.com/questions/23323747/vim-vimscript-get-exact-character-under-the-cursor
505-
elseif matchstr(getline('.'), '\%' . (col('.')-1) . 'c.') =~ '\d'
504+
elseif match(getline('.'), '\s.*\d\%'.col('.').'c') > -1
506505
norm h
507506
call ledger#align_amount_at_cursor()
508507
return "\<c-o>A"

0 commit comments

Comments
 (0)