From 29997233bc3be5c26c06575f977a334afe675a5f Mon Sep 17 00:00:00 2001 From: fdschmidt93 <39233597+fdschmidt93@users.noreply.github.com> Date: Mon, 13 Sep 2021 18:30:14 +0200 Subject: [PATCH] fix: make qf commands possible from any picker (#1237) * Allow any qf cmd by defaulting to {lnum=1, col=1} for qflist if values are unset --- lua/telescope/actions/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua index 7e65a8f..7accab0 100644 --- a/lua/telescope/actions/init.lua +++ b/lua/telescope/actions/init.lua @@ -619,8 +619,8 @@ local entry_to_qf = function(entry) return { bufnr = entry.bufnr, filename = from_entry.path(entry, false), - lnum = entry.lnum, - col = entry.col, + lnum = vim.F.if_nil(entry.lnum, 1), + col = vim.F.if_nil(entry.col, 1), text = text, } end