fix(live_grep/grep_string): support non-utf8 patterns (#2570)
This commit is contained in:
@@ -126,6 +126,10 @@ files.live_grep = function(opts)
|
||||
end
|
||||
end
|
||||
|
||||
if opts.file_encoding then
|
||||
additional_args[#additional_args + 1] = "--encoding=" .. opts.file_encoding
|
||||
end
|
||||
|
||||
local args = flatten { vimgrep_arguments, additional_args }
|
||||
opts.__inverted, opts.__matches = opts_contain_invert(args)
|
||||
|
||||
@@ -187,6 +191,10 @@ files.grep_string = function(opts)
|
||||
end
|
||||
end
|
||||
|
||||
if opts.file_encoding then
|
||||
additional_args[#additional_args + 1] = "--encoding=" .. opts.file_encoding
|
||||
end
|
||||
|
||||
if search == "" then
|
||||
search = { "-v", "--", "^[[:space:]]*$" }
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user