aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/menu.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2020-08-10 18:02:41 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2020-08-10 18:02:41 -0400
commita88896a26d3d8d7ce5750c0942b6ea394a654edb (patch)
tree3e86289df4f2d2f4ff5bd3f083fa4909920db9c4 /modules/textadept/menu.lua
parenteebe21d48a1232b6575b03e0bde09bcf82c907e5 (diff)
downloadtextadept-a88896a26d3d8d7ce5750c0942b6ea394a654edb.tar.gz
textadept-a88896a26d3d8d7ce5750c0942b6ea394a654edb.zip
"View > Toggle Fold" toggles folding for the current block, regardless of line.
Previously, you had to be on a line that was a fold point.
Diffstat (limited to 'modules/textadept/menu.lua')
-rw-r--r--modules/textadept/menu.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua
index b17c853f..4728023e 100644
--- a/modules/textadept/menu.lua
+++ b/modules/textadept/menu.lua
@@ -317,7 +317,8 @@ local default_menubar = {
end},
SEPARATOR,
{_L['Toggle Current Fold'], function()
- view:toggle_fold(buffer:line_from_position(buffer.current_pos))
+ local line = buffer:line_from_position(buffer.current_pos)
+ view:toggle_fold(buffer.fold_parent[line])
end},
SEPARATOR,
{_L['Toggle Show Indent Guides'], function()