From 5acb9474a09966c03c0c2541f0d48367d5532029 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Tue, 12 Jul 2022 15:47:39 +0200 Subject: [PATCH] fix: cursor theme for nvim 0.7 (#2069) --- lua/telescope/pickers/layout_strategies.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/telescope/pickers/layout_strategies.lua b/lua/telescope/pickers/layout_strategies.lua index 6e09c64..7af7761 100644 --- a/lua/telescope/pickers/layout_strategies.lua +++ b/lua/telescope/pickers/layout_strategies.lua @@ -600,7 +600,12 @@ layout_strategies.cursor = make_documented_layout( end local position = vim.api.nvim_win_get_position(0) - local winbar = vim.o.winbar == "" and 0 or 1 + local winbar = (function() + if vim.fn.exists "&winbar" == 1 then + return vim.o.winbar == "" and 0 or 1 + end + return 0 + end)() local top_left = { line = vim.fn.winline() + position[1] + bs + winbar, col = vim.fn.wincol() + position[2],