jakewvincent / mkdnflow.nvim

Fluent navigation and management of markdown notebooks
GNU General Public License v3.0
654 stars 37 forks source link

Bug: Indenting the last item in a list causes error #213

Closed jakewvincent closed 2 months ago

jakewvincent commented 2 months ago

If using tab to indent an empty list item, and said list item is the last item in the list, the following error is thrown:

Error executing Lua callback: ...cal/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/lists.lua:104: attempt to index a nil value
stack traceback:
    ...cal/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/lists.lua:104: in function 'get_siblings'
    ...cal/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/lists.lua:161: in function 'update_numbering'
    ...cal/share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/lists.lua:539: in function 'updateNumbering'
    .../share/nvim/lazy/mkdnflow.nvim/lua/mkdnflow/wrappers.lua:57: in function 'indentListItemOrJumpTableCell'
    ....local/share/nvim/lazy/mkdnflow.nvim/plugin/mkdnflow.lua:39: in function <....local/share/nvim/lazy/mkdnflow.nvim/plugin/mkdnflow.lua:38>