zufuliu / notepad4

Notepad4 (Notepad2⨯2, Notepad2++) is a light-weight Scintilla based text editor for Windows with syntax highlighting, code folding, auto-completion and API list for many programming languages and documents, bundled with file browser plugin matepath.
Other
3.13k stars 203 forks source link

Issue with Transform backslashes automatically switched on in Find/Replace Text dialogue #783

Closed bluenlive closed 5 months ago

bluenlive commented 5 months ago

Hello. Thanks as always for your great programme.

When opening the Find/Replace Text dialogue in notepad2, if there is a selection, it goes like this

  1. if there is a selection, copy its contents to the string to be found
  2. if the find string contains characters such as CR, LF, etc. and is not a regular expression search, Transform backslashes is switched on

However, this causes confusion when editing ASS/SSA subtitles.

Dialogue: 0,0:00:37.49,0:00:39.93,쿄칭,,0,0,0,,{\blur4\fad(200,300)}이것은 내가...
Dialogue: 0,0:00:46.19,0:00:47.79,독백,,0,0,0,,{\blur4\fad(200,300)}이것은 내가―!
Dialogue: 0,0:00:56.22,0:00:57.78,쿄칭,,0,0,0,,{\blur4\fad(200,300)}총대장을...

This subtitle uses the \ character as a subtitle tag, as shown above, because if the user doesn't realise that the Transform backslashes is automatically on, it causes an unintended replacement.

I would like to resolve this small issue.

zufuliu commented 5 months ago

Don't have a good idea to fix this, backslash in copied text will be doubled when transform backslash in on.

image

bluenlive commented 5 months ago

Hmm... You're right. Backslash is added so, user can notify this situation.

I'll close this. Thanks for kind reply.

zufuliu commented 5 months ago

Should be fixed by dd82a7af0016a4e00654360ad548eaec66a5c8c9, regression from ea3e54fe05f6fe2779bb30f3caf7d8fba249436d (lpefr->bTransformBS is not reset when second copy doesn't actually transforms backslashes).