mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 16:29:55 +00:00
Don't give commas special meaning when matching comments to openmw.cfg values
Previously, comments would be associated with the openmw.cfg line that followed them, but only up to the first comma. This meant that if you had fallback=thing,otherthing and fallback=thing,thirdthing, comments above the thirdthing line would be moved above the otherthing line, even though both lines would be kept when the file was written out. This seemed to be an attempt at a feature when cc9cii first implemented the comment preservation system, but it only seems to cause confusion.
This commit is contained in:
parent
4c9206485b
commit
29af981345
1 changed files with 1 additions and 1 deletions
|
@ -325,7 +325,7 @@ bool Config::GameSettings::writeFileWithComments(QFile& file)
|
|||
// +----------------------------------------------------------+
|
||||
//
|
||||
//
|
||||
QRegularExpression settingRegex("^([^=]+)\\s*=\\s*([^,]+)(.*)$");
|
||||
QRegularExpression settingRegex("^([^=]+)\\s*=\\s*(.+?)\\s*$");
|
||||
std::vector<QString> comments;
|
||||
auto commentStart = fileCopy.end();
|
||||
std::map<QString, std::vector<QString>> commentsMap;
|
||||
|
|
Loading…
Reference in a new issue