From 17713053f465b6ef402cfc52ce05bcfb0b710c18 Mon Sep 17 00:00:00 2001 From: Declan Mullen Date: Fri, 12 Jul 2024 18:28:23 -0700 Subject: [PATCH] chore: add comment explaining how to get a simpler error message --- lua/cinnamon/scroll.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/cinnamon/scroll.lua b/lua/cinnamon/scroll.lua index f412a6f..53f85f7 100644 --- a/lua/cinnamon/scroll.lua +++ b/lua/cinnamon/scroll.lua @@ -129,6 +129,7 @@ H.execute_command = function(command) if vim.v.count ~= 0 then command = vim.v.count .. command end + -- Indexing the vim.cmd table gives a simpler error message local success, message = pcall(vim.cmd.normal, { command, bang = true }) if not success then vim.notify(message:gsub("^Vim:", ""), vim.log.levels.ERROR)