diff options
-rw-r--r-- | modules/textadept/command_entry.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua index 1a5a3df9..b652e9d9 100644 --- a/modules/textadept/command_entry.lua +++ b/modules/textadept/command_entry.lua @@ -47,6 +47,8 @@ local env = setmetatable({}, { local f = buffer[k] if f and type(f) == 'function' then f = function(...) return buffer[k](buffer, ...) end + elseif f == nil and type(view[k]) == 'function' then + f = function(...) view[k](view, ...) end -- do not return a value elseif f == nil then f = view[k] or ui[k] or _G[k] end |