From 0ea103c3def8fa61af267558dac99f21ea2eec1a Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 17 Aug 2020 18:24:25 -0400 Subject: Fixed fold toggling when on lines that are headers. --- modules/textadept/menu.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index 4728023e..7883de82 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -318,7 +318,7 @@ local default_menubar = { SEPARATOR, {_L['Toggle Current Fold'], function() local line = buffer:line_from_position(buffer.current_pos) - view:toggle_fold(buffer.fold_parent[line]) + view:toggle_fold(math.max(buffer.fold_parent[line], line)) end}, SEPARATOR, {_L['Toggle Show Indent Guides'], function() -- cgit v1.2.3