From fe2b245ea124427a22f6008c45aa43eec37b2661 Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Mon, 11 Oct 2021 18:37:51 +0900 Subject: [PATCH] Fix #330 --- lua/cmp/view/docs_view.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cmp/view/docs_view.lua b/lua/cmp/view/docs_view.lua index 2027992..29555b1 100644 --- a/lua/cmp/view/docs_view.lua +++ b/lua/cmp/view/docs_view.lua @@ -33,7 +33,7 @@ docs_view.open = function(self, e, view) local right_space = vim.o.columns - (view.col + view.width) - 2 local left_space = view.col - 2 - local maxwidth = math.min(documentation.maxwidth, math.max(left_space, right_space)) + local maxwidth = math.min(documentation.maxwidth, math.max(left_space, right_space) - 1) -- update buffer content if needed. if not self.entry or e.id ~= self.entry.id then