Make searches case insensitive

This commit is contained in:
Kovid Goyal 2023-03-23 15:58:47 +05:30
parent ccf1dfabbc
commit d57e47349b
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -310,7 +310,7 @@ func (self *Handler) do_search(query string) {
if !self.current_search_is_regex {
query = regexp.QuoteMeta(query)
}
pat, err := regexp.Compile(query)
pat, err := regexp.Compile(`(?i)` + query)
if err != nil {
self.statusline_message = fmt.Sprintf("Bad regex: %s", err)
self.lp.Beep()