From acb7c70264348bc80c151bfc76c7b107e8db99ab Mon Sep 17 00:00:00 2001 From: mitchell Date: Thu, 26 Mar 2020 11:20:26 -0400 Subject: Switch to 1-based indices in Lua. The only external, 3rd party lexers that would be affected are those implementing their own fold functions. --- test/test_lexlua.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/test_lexlua.lua') diff --git a/test/test_lexlua.lua b/test/test_lexlua.lua index f7bfd94c0..3436d9d19 100644 --- a/test/test_lexlua.lua +++ b/test/test_lexlua.lua @@ -159,7 +159,7 @@ function assert_fold_points(lex, code, expected_fold_points, initial_style) }) end lexer.property['fold'] = 1 - local levels = lex:fold(code, 0, 1, lexer.FOLD_BASE) + local levels = lex:fold(code, 1, 1, lexer.FOLD_BASE) local j = 1 for i = 1, #levels do if i == expected_fold_points[j] then @@ -544,8 +544,8 @@ function test_fold_by_indentation() else: baz ]] - lexer.fold_level = {[0] = lexer.FOLD_BASE} -- Scintilla normally creates this - lexer.indent_amount = {[0] = 0} -- Scintilla normally creates this + lexer.fold_level = {lexer.FOLD_BASE} -- Scintilla normally creates this + lexer.indent_amount = {0} -- Scintilla normally creates this local folds = {1, 3} assert_fold_points(lex, code, folds) end -- cgit v1.2.3