Bug 1217275 - Fix missing \n in IMMHandler::HandleDocumentFeed(), it was replaced to empty string accidentally. r=m_kato, a=sylvestre
--- a/widget/windows/IMMHandler.cpp
+++ b/widget/windows/IMMHandler.cpp
@@ -1741,17 +1741,17 @@ IMMHandler::HandleDocumentFeed(nsWindow*
if (targetOffset > int32_t(str.Length())) {
MOZ_LOG(gIMMLog, LogLevel::Error,
("IMM: HandleDocumentFeed, FAILED, due to the caret offset is invalid"));
return false;
}
// Get the focused paragraph, we decide that it starts from the previous CRLF
// (or start of the editor) to the next one (or the end of the editor).
- int32_t paragraphStart = str.RFind("", false, targetOffset, -1) + 1;
+ int32_t paragraphStart = str.RFind("\n", false, targetOffset, -1) + 1;
int32_t paragraphEnd =
str.Find("\r", false, targetOffset + targetLength, -1);
if (paragraphEnd < 0) {
paragraphEnd = str.Length();
}
nsDependentSubstring paragraph(str, paragraphStart,
paragraphEnd - paragraphStart);