Eandrju / cellular-automaton.nvim

A useless plugin that might help you cope with stubbornly broken tests or overall lack of sense in life. It lets you execute aesthetically pleasing, cellular automaton animations based on the content of neovim buffer.
MIT License
1.89k stars 34 forks source link

Switching from let_it_rain to game_of_life causes error. #13

Closed felixniemeyer closed 1 year ago

felixniemeyer commented 1 year ago

Maybe that's not a common usecase - but the second thing I tried after letting it rain was making the fallen rain turn in to new life (game_of_life), which failed with some error.

Eandrju commented 1 year ago

Hey, thanks for reporting that. I'm on holidays now, I'm going to look into that next week.

Eandrju commented 1 year ago

@felixniemeyer What was the error, as I failed to reproduced the issue

felixniemeyer commented 1 year ago

Hi, Let me clarify: you still have to be in the letting_it_rain buffer and execute :CellularAutomaton game_of_life there and not switch back to the original buffer with :q in between. I expect that what was rain to come to life according to the game of life rules then. Instead, I get this error:


Error executing Lua callback: ...llular-automaton.nvim/lua/cellular-automaton/manager.lua:71: ...llular-automaton.nvim/lua/cellular-automaton/manager.lua:52: Nested animations are forbidden                      
stack traceback:
        [C]: in function 'error'
        ...llular-automaton.nvim/lua/cellular-automaton/manager.lua:71: in function 'execute_animation'
        .../cellular-automaton.nvim/lua/cellular-automaton/init.lua:43: in function 'start_animation'
        ...rt/cellular-automaton.nvim/plugin/cellular-automaton.lua:16: in function <...rt/cellular-automaton.nvim/plugin/cellular-automaton.lua:15>```
Eandrju commented 1 year ago

Nested animations are forbidden. It's even stated in the error you pasted ;)

felixniemeyer commented 1 year ago

Ah that's a nested animation. Makes sense ;) Thank you