From ff6fbbc3227b49fc5407ddbcc7a3f7dac6993482 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 10 Mar 2020 11:19:00 -0400 Subject: Core code cleanup, reformat, refactoring, and bugfixes. `events.FILE_CHANGED` was not emitting a filename. Added tests for key commands, keychains, and key modes. --- core/iface.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/iface.lua') diff --git a/core/iface.lua b/core/iface.lua index d6d9066e..f3f3847a 100644 --- a/core/iface.lua +++ b/core/iface.lua @@ -59,6 +59,7 @@ local marker_number, indic_number, list_type, image_type = -1, -1, 0, 0 -- @see buffer.marker_define -- @name next_marker_number function M.next_marker_number() + assert(marker_number < M.constants.MARKER_MAX, 'too many markers in use') marker_number = marker_number + 1 return marker_number end @@ -71,6 +72,7 @@ end -- @see buffer.indic_style -- @name next_indic_number function M.next_indic_number() + assert(indic_number < M.constants.INDICATOR_MAX, 'too many indicators in use') indic_number = indic_number + 1 return indic_number end -- cgit v1.2.3