aboutsummaryrefslogtreecommitdiff
path: root/core/ui.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/ui.lua')
-rw-r--r--core/ui.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/ui.lua b/core/ui.lua
index a30b5e7a..06d68776 100644
--- a/core/ui.lua
+++ b/core/ui.lua
@@ -302,6 +302,10 @@ events_connect(events.BUFFER_NEW, function()
buffer:private_lexer_call(SETLEXERLANGUAGE, 'text')
end)
+-- Switches between buffers when a tab is clicked.
+events_connect(events.TAB_CLICKED,
+ function(index) view:goto_buffer(_BUFFERS[index]) end)
+
-- Sets the title of the Textadept window to the buffer's filename.
local function set_title()
local filename = buffer.filename or buffer._type or _L['Untitled']