From b5290fd92935d2e96fa2249cfd09bdd853972869 Mon Sep 17 00:00:00 2001 From: dotfrag <17456867+dotfrag@users.noreply.github.com> Date: Thu, 18 Jul 2024 08:10:22 +0300 Subject: [PATCH] feat(terminal): clear search highlight when opening a terminal (#4090) ## Description Often times when opening a terminal or lazygit when a search is active, words in the terminal are highlighted. In my opinion this is rarely, if not never intended. This attempts to fixes this behavior. The code of `terminal.lua` is a bit beyond me, but I believe I have added it to the right place. ## Related Issue(s) N/A. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/util/terminal.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/util/terminal.lua b/lua/lazyvim/util/terminal.lua index 598f8ffc..87f8553b 100644 --- a/lua/lazyvim/util/terminal.lua +++ b/lua/lazyvim/util/terminal.lua @@ -87,6 +87,8 @@ function M.open(cmd, opts) vim.cmd.startinsert() end, }) + + vim.cmd("noh") end return terminals[termkey]