mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-10 20:13:46 -05:00
Fixed function EvaluateExpr
- Added support for column references in current row when defining formulas for individual cells.
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user