andmarti1424 / sc-im

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

Pressing X Triggers Lua Function #866

Open fg-charles opened 6 months ago

fg-charles commented 6 months ago

On a fresh instance of sc-im, after using a lua string function, pressing x triggers the function. This video below shows this happening with the lua function now.lua; a lua file with the single line sc.lsetstr(sc.curcol(), sc.currow(), "hi!"). This also happens when cell in which x is pressed has content, replacing the content with the result of the lua call.

Edit: the lua function is also triggered when inserting a row/column, and deleting a range.

andmarti1424 commented 6 months ago

Hello. Please share your file. Have you checked the doc? Specifically the section regarding triggers...?

fg-charles commented 6 months ago

The file only has a single line: sc.lsetstr(sc.curcol(), sc.currow(), "hi!") and is placed in ~/.config/sc-im/lua/. (It is a lua file, I had to use .txt to please GitHub). My scimrc is empty and the bug is reproduced on a fresh sc-im instance. I have read the section on triggers, but since my scimrc is empty and I'm using a fresh sc-im instance, I'm sure that I'm not using them.