micro/internal/display
Dmitry Maluka ffbb257434
Support for highlighting all search matches (hlsearch) (#1762)
* Support for highlighting all search matches (hlsearch)

hlsearch is implemented efficiently using the buffer's line array,
somewhat similarly to the syntax highlighting.
Unlike the syntax highlighter which highlights the entire file,
hlsearch searches for matches for the displayed lines only.
Matches are searched when the given line is displayed first time
or after it was modified. Otherwise the previously found matches
are used.

* Add UnhighlightSearch action

and add it to the list of actions triggered by Esc key by default.

* Add comment explaining the purpose of search map

* Add hlsearch colors to colorschemes

Mostly just copied from the corresponding original (mostly vim) colorschemes.

* Highlight matches during/after replace as well

As a side effect it also changes the last search value, i.e. affects FindNext
and FindPrevious, but it's probably fine. In vim it works the same way.

* Improve hlsearch option description
2021-09-28 13:39:03 -07:00
..
bufwindow.go Support for highlighting all search matches (hlsearch) (#1762) 2021-09-28 13:39:03 -07:00
infowindow.go Fix up X,Y values in BufView 2021-04-09 01:48:58 +02:00
softwrap.go Implement word wrapping 2021-04-08 23:54:10 +02:00
statusline.go Fix internal string binding representation 2020-11-05 15:52:25 -05:00
tabwindow.go Add tabbar.active color group (#1831) 2020-10-17 20:53:08 -04:00
termwindow.go Fix palette colors with tcell v2 2020-09-21 01:21:59 -04:00
uiwindow.go Fix non-working split resize with mouse drag (#1811) 2020-08-04 18:37:19 -04:00
window.go Replace BufWidth & BufHeight with BufView 2021-04-08 23:54:18 +02:00