From aa10e421b2b4585e411923c7ef26669420c68812 Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Sun, 3 Feb 2013 17:49:05 +0100 Subject: [PATCH] Fixes the column position when invoking idetools. Vim starts counting columns from 1 but the nimrod idetools command starts from zero. This can be verified writing a call to the quit() proc with a two level identation and trying to invoke idetools on the whitespace before the word. --- autoload/nimrod.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/nimrod.vim b/autoload/nimrod.vim index 13ac84d..328c2e4 100644 --- a/autoload/nimrod.vim +++ b/autoload/nimrod.vim @@ -62,7 +62,7 @@ let g:nimrod_symbol_types = { fun! NimExec(op) let cmd = printf("nimrod idetools %s --track:\"%s,%d,%d\" \"%s\"", - \ a:op, expand('%:p'), line('.'), col('.'), CurrentNimrodFile()) + \ a:op, expand('%:p'), line('.'), col('.')-1, CurrentNimrodFile()) call add(g:nim_log, cmd) let output = system(cmd)