AutoYADM commit: 2025-07-16 22:30:28

This commit is contained in:
Daniel Fichtinger 2025-07-16 22:30:28 -04:00
parent 6d29eef438
commit a8c381e31f

View file

@ -38,8 +38,10 @@ provide-module search-highlight %—
# enable the plugin # enable the plugin
define-command -hidden search-highlight-enable-impl %{ define-command -hidden search-highlight-enable-impl %{
# we only watch the search register in / and reverse / searches
hook -group search-highlight window NormalKey (/|<a-/>) %{
# register hook to show highlighting during search # register hook to show highlighting during search
hook -group search-highlight window RegisterModified '/' %{ hook -group search-highlight-impl window RegisterModified '/' %{
# check whether already enabled # check whether already enabled
try %{ try %{
%opt{search_highlight_status} %opt{search_highlight_status}
@ -58,6 +60,9 @@ provide-module search-highlight %—
# register hook to clear highlighter after leaving search # register hook to clear highlighter after leaving search
hook -once -group search-highlight window NormalIdle .* %{ hook -once -group search-highlight window NormalIdle .* %{
# stop watching the search register
# (we've left search now)
remove-hooks window search-highlight-impl
# check if auto clear is set # check if auto clear is set
try %{ try %{
%opt{search_highlight_auto_clear} %opt{search_highlight_auto_clear}
@ -84,10 +89,11 @@ provide-module search-highlight %—
} }
} }
} }
}
# remove the plugin's hooks # remove the plugin's hooks
define-command -hidden search-highlight-disable-impl %{ define-command -hidden search-highlight-disable-impl %{
remove-hooks window search-highlight remove-hooks window search-highlight(-impl)?
} }
## begin public commands ## begin public commands