Skip to content
This repository was archived by the owner on Sep 28, 2024. It is now read-only.

Commit af562c7

Browse files
committed
Use buffer.lexer_language now that it's available.
Requires latest Textadept.
1 parent c4ea502 commit af562c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ textadept.editing.api_files.python = {
9797

9898
-- Indent on 'Enter' after a ':' or auto-indent on ':'.
9999
events.connect(events.CHAR_ADDED, function(ch)
100-
if buffer:get_lexer() ~= 'python' or (ch ~= 10 and ch ~= 58) then return end
100+
if buffer.lexer_language ~= 'python' or (ch ~= 10 and ch ~= 58) then return end
101101
local l = buffer:line_from_position(buffer.current_pos)
102102
if l > 1 then
103103
local line = buffer:get_line(l - (ch == 10 and 1 or 0))

0 commit comments

Comments
 (0)