aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/textadept/menu.lua2
1 files changed, 1 insertions, 1 deletions
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()