
So I used, for my tests, a portable 圆4 - v7.9.3 N++ release, on a Win 8 laptop. I hope, there are the right links to test your Fix single-step Replace for regex backslash K case build ! With the help of the instructions that you provided, Scott, I was able to : PR-it or delete it? And is 2048 reasonable? Or would 512 characters be enough? This 2048 "window" would be the maximum number of characters allowed before the \K. The solution is based on starting the search not at current position, but 2048 characters before. Since this issue is assigned to you, I ask for your opinion here. Later, I forgot about it, but, as I remember, it did work. Return static_cast(execute(SCI_SEARCHINTARGET, len, reinterpret_cast(text2FindA))) While ((fa >= 0) & (fa (execute(SCI_SEARCHINTARGET, len, reinterpret_cast(text2FindA))) Įxecute(SCI_SETTARGETRANGE, fromPos, toPos) Int fa = static_cast(execute(SCI_SEARCHINTARGET, len, reinterpret_cast(text2FindA))) LRESULT sf = execute(SCI_GETSEARCHFLAGS)

Size_t len = (lenOfText2Find > text2FindALen) ? lenOfText2Find : text2FindALen Size_t text2FindALen = strlen(text2FindA) UINT cp = static_cast(execute(SCI_GETCODEPAGE)) Ĭonst char *text2FindA = wmc.wchar2char(text2Find, cp) WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance()

Int ScintillaEditView::searchInTarget(const TCHAR * text2Find, size_t lenOfText2Find, size_t fromPos, size_t toPos) const Some references that discuss this behavior of \K with step-by-step Replace Note that the replacements will be made if Replace All is used, but that's not what this issue is about. Plugins : mimeTools.dll NppConverter.dll NppExport.dll Other No replacement was made on line 2 and the editor window now looks like this (following match is selected): I expected the ck that was selected in line 2 (as shown in the screenshot of step 5 above) to be replaced with CK. This seems OK as that is what \K is supposed to provide. Note that due to the \K syntax, the part of the match before the \K is "forgotten about" and not included in the selection.Press Replace and observe the editor window displays the next occurring match by selecting it:.


