From 6c275e2f6ae8c68c8bf07ca48ea14af4ced2f803 Mon Sep 17 00:00:00 2001 From: daangoossens22 <62295482+daangoossens22@users.noreply.github.com> Date: Fri, 28 Jan 2022 16:31:39 +0100 Subject: [PATCH] fix (autocommands): doesn't show all autocommands (#1717) --- lua/telescope/builtin/internal.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/telescope/builtin/internal.lua b/lua/telescope/builtin/internal.lua index e0c5f5e..4765e60 100644 --- a/lua/telescope/builtin/internal.lua +++ b/lua/telescope/builtin/internal.lua @@ -1096,7 +1096,8 @@ internal.autocommands = function(opts) end if current_ft and cmd then - source_file, source_lnum = line:match "Last set from (.*) line (.*)" + source_file = line:match "Last set from (.*) line %d*$" or line:match "Last set from (.*)$" + source_lnum = line:match "line (%d*)$" or "1" if source_file then local autocmd = {} autocmd.event = current_event