andmarti1424 / sc-im

sc-im - Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal
Other
4.85k stars 207 forks source link

Lua - Get Calling Cell #784

Closed Firimo closed 1 year ago

Firimo commented 1 year ago

Hi,

is there a way to get the cell id (column,row), which is calling the Lua script? The functions "curcol()" and "currow()" give me the id of the cell, where my cursor is at. I want the id of where the @lua() string is at.

The current behavior is not what I would expect and it leads to a segmentation fault at startup in my specific use case (because I wanted to read from cells, to the left of the calling cell).

Otherwise sc-im is nice :+1:

Kind regards

gzagatti commented 1 year ago

It is indeed not possible to do what you wanted. PR#814 hopefully solves this issue, please take a look.

andmarti1424 commented 1 year ago

Solved with PR#814.