From 9a8c489cce2a69c614cf6052bbad3c68d7cd2a61 Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Sun, 8 Oct 2023 18:59:33 +0200 Subject: [PATCH] fix: Properly handle out of table import try --- lua/easytables/import.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/easytables/import.lua b/lua/easytables/import.lua index 558642b..cc1806f 100644 --- a/lua/easytables/import.lua +++ b/lua/easytables/import.lua @@ -19,6 +19,10 @@ end local function find_row_start(buffer) local position = vim.api.nvim_win_get_cursor(0) + if find_col_start(buffer, position[1]) == nil then + return nil + end + local current_line = position[1] - 1 while true do if find_col_start(buffer, current_line) == nil then