diff options
author | 2020-08-17 18:24:25 -0400 | |
---|---|---|
committer | 2020-08-17 18:24:25 -0400 | |
commit | 0ea103c3def8fa61af267558dac99f21ea2eec1a (patch) | |
tree | ebd9186f068401ec14e76e55bc2915ba938c0877 /modules | |
parent | d0d6905adb25d13ad72a1c10e2242cdae9769ce7 (diff) | |
download | textadept-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.lua | 2 |
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() |