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

Commit

Permalink
Use buffer.lexer_language now that it's available.
Browse files Browse the repository at this point in the history
Requires latest Textadept.
  • Loading branch information
orbitalquark committed Sep 9, 2022
1 parent 2b9473a commit b259830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ end)

-- Verify syntax.
events.connect(events.FILE_AFTER_SAVE, function()
if buffer:get_lexer() ~= 'yaml' or not lyaml then return end
if buffer.lexer_language ~= 'yaml' or not lyaml then return end
buffer:annotation_clear_all()
local ok, errmsg = pcall(lyaml.load, buffer:get_text())
if ok then return end
Expand Down

0 comments on commit b259830

Please sign in to comment.