How to remove CRLF characters when using grep_live? #1404
-
I am seeing "^M" characters at the end of the lines when live grepping. I am on windows and these files do in fact have CRLF line endings, but I noticed that telescope removes them somehow. How can we remove CRLF characters so they don't show when live grepping? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
I am afraid, I don't have Windows, so we'd have to do a little pair investigation, if you don't mind. Here are initial questions:
My guess (and hope) that this can be fixed with some |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
This should now be fixed on latest |
Beta Was this translation helpful? Give feedback.
Yes, because it seems to adjust that during file reading regardless of platform. I think I'd like a more OS robust approach if it is possible.
Yes, adjusting how items are shown was next step. Would you mind, please, checking two possible solutions to this? Apply each of these independently from one another:
local items = vim.split(table.concat(data_feed), H.is_windows and '\r\n' or '\n')
. This one adjusts how lines are separated when getting results from CLI.lines = vim.tbl_map(function(l) return l:gsub('…