Make searches case insensitive

This commit is contained in:
Kovid Goyal
2023-03-23 15:58:47 +05:30
parent ccf1dfabbc
commit d57e47349b

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()