aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2020-08-17 18:24:25 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2020-08-17 18:24:25 -0400
commit0ea103c3def8fa61af267558dac99f21ea2eec1a (patch)
treeebd9186f068401ec14e76e55bc2915ba938c0877 /modules
parentd0d6905adb25d13ad72a1c10e2242cdae9769ce7 (diff)
downloadtextadept-0ea103c3def8fa61af267558dac99f21ea2eec1a.tar.gz
textadept-0ea103c3def8fa61af267558dac99f21ea2eec1a.zip
Fixed fold toggling when on lines that are headers.
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()