id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4395	Search ignores newlines	sxmboer2		"I have used mc for about 25 years and this is a *longstanding* bug introduced probably in Jan 2010 when the search engine was split over a regex/normal/hex/... implementation. I think this bug report is related to ticket #400; if not exactly the same.

Older versions of mc allowed one to search (and replace) for multi-line strings, e.g.:
""some text

some more text""

to do so, in the editor: hit search text CTRL-Q ENTER CTRL-Q ENTER some ENTER
used to find the string spanning the three lines, but that stopped working at that time.

Another example: to find/replace an indented line in a file:
F7 CTRL-Q TAB CTRL-Q ENTER (enter) will not find any occurrence.
Other examples also do not make it possible to find filenames in the panel with a newline in the filename either in file selection dialogue or the find file/panelize function and so on. 

The included patch fixes all these issues and reverts mc back to the <= mc-4.6.x behavior.

Also, the current patch will also make it possible to do a search and replace in regex mode, for instance to replace every triple newline followed by a tab by a single newline by entering the following two inputs in the search dialogue:
""\n\n\n\t"" ""\n""

I have tested all functions calling the mc_search function and have found no adverse effects after this patch.
 "	defect	closed	major		mc-search	master	duplicate	search newline				no branch	
