Fix unsaved tab containing tab character display glitch

Disallow tab character via pasting when renaming a file tab.

Fix #15202, close #15211
pull/15263/head^2
Alan Kilborn 2024-05-28 06:58:40 -04:00 committed by Don Ho
parent f37f2d0ffe
commit 721a845bec
1 changed files with 3 additions and 2 deletions

View File

@ -1901,8 +1901,9 @@ bool Notepad_plus::fileRename(BufferID id)
// So just rename the tab and rename the backup file too if applicable // So just rename the tab and rename the backup file too if applicable
// https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file // https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file
// Reserved characters: < > : " / \ | ? * // Reserved characters: < > : " / \ | ? * tab
std::wstring reservedChars = TEXT("<>:\"/\\|\?*"); // ("tab" is not in the official list, but it is good to avoid it)
std::wstring reservedChars = TEXT("<>:\"/\\|\?*\t");
std::wstring staticName = _nativeLangSpeaker.getLocalizedStrFromID("tabrename-newname", L"New name"); std::wstring staticName = _nativeLangSpeaker.getLocalizedStrFromID("tabrename-newname", L"New name");