aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-10-04 15:42:30 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2008-10-04 15:42:30 -0400
commit4dd5c46bd6e0b3a7a882238c3afa69d995d541ce (patch)
tree840f11bc56b02b09afb60a5caf760fe8f41e73b8 /core
parent266058b017447d5c40bb3cff9d61bc5b8c0ad97d (diff)
downloadtextadept-4dd5c46bd6e0b3a7a882238c3afa69d995d541ce.tar.gz
textadept-4dd5c46bd6e0b3a7a882238c3afa69d995d541ce.zip
Fixed view grow/shrink error when view isn't split; core/ext/menu.lua
Diffstat (limited to 'core')
-rw-r--r--core/ext/menu.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/ext/menu.lua b/core/ext/menu.lua
index 61c02ee5..f9415d70 100644
--- a/core/ext/menu.lua
+++ b/core/ext/menu.lua
@@ -280,8 +280,12 @@ local actions = {
['Split Horizontal'] = { 'split', v, false },
['Unsplit'] = { function() view:unsplit() end },
['Unsplit All'] = { function() while view:unsplit() do end end },
- ['Grow View'] = { function() view.size = view.size + 10 end },
- ['Shrink View'] = { function() view.size = view.size - 10 end },
+ ['Grow View'] = {
+ function() if view.size then view.size = view.size + 10 end end
+ },
+ ['Shrink View'] = {
+ function() if view.size then view.size = view.size - 10 end end
+ },
-- Project Manager
['Toggle PM Visible'] = { t.pm.toggle_visible },
['Focus PM'] = { t.pm.focus },