From e4af7200ff906cf466c647bf8acd41484109baa0 Mon Sep 17 00:00:00 2001 From: Dhruva Sagar Date: Tue, 21 May 2013 14:32:02 +0530 Subject: [PATCH] Fixed function EvaluateExpr - Added support for column references in current row when defining formulas for individual cells. --- autoload/tablemode.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autoload/tablemode.vim b/autoload/tablemode.vim index 9864d0d..0ea93d5 100644 --- a/autoload/tablemode.vim +++ b/autoload/tablemode.vim @@ -960,6 +960,10 @@ function! tablemode#EvaluateExpr(expr, line) abort "{{{2 endif if cell =~# ',' + if expr =~# '\$' + let expr = substitute(expr, '\$\(\d\+\)', + \ '\=str2float(s:GetCells(line, row, submatch(1)))', 'g') + endif call s:SetCell(eval(expr), line, row, colm) else let [row, line] = [1, s:GetFirstRow(line)]