mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+fix: find previous skips finding at begin
This commit is contained in:
parent
40e44f3f44
commit
5cdcddb075
@ -5911,7 +5911,7 @@ static DocPos _FindInTarget(LPCWSTR wchFind, int sFlags,
|
||||
DocPos const len = (DocPos)WideCharToMultiByte(Encoding_SciCP, 0, wchFind, -1, chFind, COUNTOF(chFind), NULL, NULL);
|
||||
|
||||
iPos = SciCall_SearchInTarget(len - 1, chFind);
|
||||
iPos = (bFindNext ? (iPos >= stop) : (iPos <= stop)) ? -1LL : iPos; // regex search
|
||||
iPos = (bFindNext ? (iPos > stop) : (iPos < stop)) ? -1LL : iPos; // not found if beyond stop
|
||||
|
||||
// handle next in case of zero-length-matches (regex) !
|
||||
if (iPos == start) {
|
||||
|
||||
@ -6382,15 +6382,17 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
|
||||
case IDM_SET_RENDER_TECH_D2D:
|
||||
case IDM_SET_RENDER_TECH_D2DRETAIN:
|
||||
case IDM_SET_RENDER_TECH_D2DDC: {
|
||||
int const prevRT = Settings.RenderingTechnology;
|
||||
int const prevRT = SciCall_GetTechnology();
|
||||
Settings.RenderingTechnology = (iLoWParam - IDM_SET_RENDER_TECH_GDI);
|
||||
SciCall_SetTechnology(Settings.RenderingTechnology);
|
||||
Settings.RenderingTechnology = SciCall_GetTechnology();
|
||||
|
||||
int const prevBD = Settings.Bidirectional;
|
||||
SciCall_SetBidirectional(Settings.Bidirectional);
|
||||
Settings.Bidirectional = SciCall_GetBidirectional();
|
||||
|
||||
if (prevRT != Settings.RenderingTechnology) {
|
||||
SciCall_SetTechnology(Settings.RenderingTechnology);
|
||||
Settings.RenderingTechnology = SciCall_GetTechnology(); // switched ?
|
||||
}
|
||||
int const prevBD = SciCall_GetBidirectional();
|
||||
if (prevBD != Settings.Bidirectional) {
|
||||
SciCall_SetBidirectional(Settings.Bidirectional);
|
||||
Settings.Bidirectional = SciCall_GetBidirectional(); // switched ?
|
||||
}
|
||||
if ((prevRT != Settings.RenderingTechnology) || (prevBD != Settings.Bidirectional)) {
|
||||
Style_ResetCurrentLexer(Globals.hwndEdit);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user