Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Pressing <S-Tab> in INSERT mode on list item results in Error executing Lua callback: stack overflow #257

Open
puresick opened this issue Nov 1, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@puresick
Copy link

puresick commented Nov 1, 2024

Bug description
There are situations where pressing results in a stack overflow.
This happens while being in INSERT mode and at the start of a list item, but only if there is a todo list item above it in the same list.

So for example, having a markdown file with the following content will result in the error.

- [ ] This is a todo item
- |

  ^
  |
  |
  This vertical bar is the cursor position

This does sometimes result in an error (did not find a way to reproduce this properly yet):

- [ ] This is a todo item
- This is a list item
- |

This does work as expected:

- [ ] This is a todo item

Some other content

- |

Reproduction steps
Steps to reproduce the behavior:

  1. Open a markdown file
  2. Copy the example content snippet from the bug description above
  3. Remove the vertical bar and place your cursor where it was
  4. Enter INSERT mode
  5. Press Shift and Tab

Expected behavior
A tab should be inserted and no error should be thrown.

Error output and/or screenshots

Error executing Lua callback: stack overflow                                                                                                                                                                                                                  
stack traceback:                                                                                                                                                                                                                                              
        [C]: in function 'nvim_buf_get_lines'                                                                                                                                                                                                                 
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:335: in function 'which_cell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:381: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...                                                                                                                                                                                                                                                   
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ...al/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/tables.lua:389: in function 'moveToCell'                                                                                                                                                             
        ....local/share/nvim/lazy/mkdnflow.nvim/plugin/mkdnflow.lua:128: in function <....local/share/nvim/lazy/mkdnflow.nvim/plugin/mkdnflow.lua:127>

Context

  • OS: Arch Linux on Kernel 6.11.5-arch1-1
  • Neovim version: v0.10.2
  • Package manager: Lazy.nvim
@puresick puresick added the bug Something isn't working label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants