From b415e862bf248d66c40e242de4a0c76c68e278f1 Mon Sep 17 00:00:00 2001 From: Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> Date: Fri, 26 Nov 2021 21:43:51 +0000 Subject: [PATCH] fix: set `nowrap` in prompt buffer (#1499) - fixes `strdisplaywidth` calculations for `dynamic_preview_title` --- ftplugin/TelescopePrompt.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ftplugin/TelescopePrompt.lua b/ftplugin/TelescopePrompt.lua index ed99898..ce7b6c1 100644 --- a/ftplugin/TelescopePrompt.lua +++ b/ftplugin/TelescopePrompt.lua @@ -2,6 +2,9 @@ vim.opt_local.formatoptions:remove "t" vim.opt_local.formatoptions:remove "c" +-- Don't include `showbreak` when calculating strdisplaywidth +vim.opt_local.wrap = false + -- There's also no reason to enable textwidth here anyway vim.opt_local.textwidth = 0 vim.opt_local.scrollbind = false