Fix two SciTE bugs

2 views
Skip to first unread message

mozers

unread,
Jan 6, 2010, 4:13:18 AM1/6/10
to scite-i...@googlegroups.com
Hello Scite-interest,
I propose to fix two SciTE bugs:

[1]. Dialogue "Parameters" does not allow to enter national characters.
To fix this bug, replace the line 152 in file SciTEWinDlg.cxx from
> -----------------------------
if (!menuKey && ::IsDialogMessage(reinterpret_cast<HWND>(wParameters.GetID()), pmsg))
> -----------------------------
to
> -----------------------------
if (!menuKey && DialogHandled(wParameters.GetID(), pmsg))
> -----------------------------
(Author: neo4max)


[2]. "Open Selected Filename" (Ctrl+Shift+O) does not work if in the file name there are national characters.
To fix this bug, replace the line 1257 in file SciTEBase.cxx from
> -----------------------------
SString SciTEBase::SelectionFilename() {
return SelectionExtend(&SciTEBase::isfilenamecharforsel);
}
> -----------------------------
to
> -----------------------------
SString SciTEBase::SelectionFilename() {
return EncodeString(SelectionExtend(&SciTEBase::isfilenamecharforsel));
}
> -----------------------------


Both improvements are successfully working in SciTE-Ru.

--
mozers
<http://scite.net.ru>

Neil Hodgson

unread,
Jan 7, 2010, 5:04:37 AM1/7/10
to scite-i...@googlegroups.com
mozers:

> [1]. Dialogue "Parameters" does not allow to enter national characters.
> To fix this bug, replace the line 152 in file SciTEWinDlg.cxx from
>> -----------------------------
> if (!menuKey && ::IsDialogMessage(reinterpret_cast<HWND>(wParameters.GetID()), pmsg))
>> -----------------------------
> to
>> -----------------------------
> if (!menuKey && DialogHandled(wParameters.GetID(), pmsg))
>> -----------------------------

OK.

> [2]. "Open Selected Filename" (Ctrl+Shift+O) does not work if in the file name there are national characters.
> To fix this bug, replace the line 1257 in file SciTEBase.cxx from
>> -----------------------------
> SString SciTEBase::SelectionFilename() {
>        return SelectionExtend(&SciTEBase::isfilenamecharforsel);
> }
>> -----------------------------
> to
>> -----------------------------
> SString SciTEBase::SelectionFilename() {
>        return EncodeString(SelectionExtend(&SciTEBase::isfilenamecharforsel));
> }

EncodeString changes the text to the encoding of the document, not
your platform encoding.

Neil

mozers

unread,
Jan 15, 2010, 9:40:27 AM1/15/10
to Neil Hodgson
Thursday, January 7, 2010, 1:04:37 PM, Neil wrote:

>> � � � �return EncodeString(SelectionExtend(&SciTEBase::isfilenamecharforsel));


> EncodeString changes the text to the encoding of the document, not
> your platform encoding.

Yes. This works only if the encoding of the document coincides with the platform encoding.
If we do not work in unicode, it is often - the truth.
I agree, this is an incomplete solution, but in any case it is better than the current implementation.

--
mozers
<http://scite.net.ru>

Reply all
Reply to author
Forward
0 new messages