Skip to content

Commit

Permalink
texworks sync
Browse files Browse the repository at this point in the history
  • Loading branch information
edocevoli committed Feb 7, 2025
1 parent 0b44b0d commit a1fd200
Show file tree
Hide file tree
Showing 28 changed files with 33 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2023 Stefan Löffler
* Copyright (C) 2023-2024 Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2023 Stefan Löffler
* Copyright (C) 2023-2024 Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2013-2020 Stefan Löffler
* Copyright (C) 2013-2024 Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2013-2020 Stefan Löffler
* Copyright (C) 2013-2024 Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2013-2023 Charlie Sharpsteen, Stefan Löffler
* Copyright (C) 2013-2024 Charlie Sharpsteen, Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2013-2023 Charlie Sharpsteen, Stefan Löffler
* Copyright (C) 2013-2024 Charlie Sharpsteen, Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2023 Stefan Löffler
* Copyright (C) 2023-2024 Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2013-2023 Charlie Sharpsteen, Stefan Löffler
* Copyright (C) 2013-2024 Charlie Sharpsteen, Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2023 Stefan Löffler, Charlie Sharpsteen
* Copyright (C) 2023-2024 Stefan Löffler, Charlie Sharpsteen
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2023 Stefan Löffler
* Copyright (C) 2023-2024 Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2022-2023 Stefan Löffler
* Copyright (C) 2022-2024 Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2022-2023 Stefan Löffler
* Copyright (C) 2022-2024 Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2013-2023 Charlie Sharpsteen, Stefan Löffler
* Copyright (C) 2013-2024 Charlie Sharpsteen, Stefan Löffler
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2010-2020 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
Copyright (C) 2010-2024 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2010-2021 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
Copyright (C) 2010-2024 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion Programs/Editors/TeXworks/source/src/CompletingEdit.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2007-2023 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
Copyright (C) 2007-2024 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion Programs/Editors/TeXworks/source/src/FindDialog.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2007-2023 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
Copyright (C) 2007-2024 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion Programs/Editors/TeXworks/source/src/PrefsDialog.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2007-2023 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
Copyright (C) 2007-2024 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion Programs/Editors/TeXworks/source/src/ResourcesDialog.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2011-2020 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
Copyright (C) 2011-2024 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion Programs/Editors/TeXworks/source/src/Settings.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2019-2020 Stefan Löffler
Copyright (C) 2019-2024 Stefan Löffler
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion Programs/Editors/TeXworks/source/src/Settings.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2019-2020 Stefan Löffler
Copyright (C) 2019-2024 Stefan Löffler
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
6 changes: 3 additions & 3 deletions Programs/Editors/TeXworks/source/src/TWApp.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2007-2024 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
Copyright (C) 2007-2025 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -305,7 +305,7 @@ TWApp::CommandLineData TWApp::processCommandLine()
Copyright (C) %1 %2\n\
License GPLv2+: GNU GPL (version 2 or later) <http://gnu.org/licenses/gpl.html>\n\
This is free software: you are free to change and redistribute it.\n\
There is NO WARRANTY, to the extent permitted by law.\n\n").arg(QString::fromLatin1("2007-2024"), QString::fromUtf8("Stefan Löffler, Jonathan Kew, Charlie Sharpsteen"));
There is NO WARRANTY, to the extent permitted by law.\n\n").arg(QString::fromLatin1("2007-2025"), QString::fromUtf8("Stefan Löffler, Jonathan Kew, Charlie Sharpsteen"));
strm.flush();
}
if ((i = clp.getNextSwitch(QString::fromLatin1("help"))) >= 0) {
Expand Down Expand Up @@ -504,7 +504,7 @@ void TWApp::about()
{
QString aboutText = tr("<p>%1 is a simple environment for editing, typesetting, and previewing TeX documents.</p>").arg(applicationName());
aboutText += QLatin1String("<small>");
aboutText += QLatin1String("<p>&#xA9; 2007-2024 Stefan L&#xF6;ffler, Jonathan Kew, Charlie Sharpsteen");
aboutText += QLatin1String("<p>&#xA9; 2007-2025 Stefan L&#xF6;ffler, Jonathan Kew, Charlie Sharpsteen");
#if defined(MIKTEX)
aboutText += tr("<br>Version %1 (%2)").arg(Tw::Utils::VersionInfo::versionString(), QString::fromUtf8(MiKTeX::Core::Utils::GetMiKTeXBannerString().c_str()));
#else
Expand Down
2 changes: 1 addition & 1 deletion Programs/Editors/TeXworks/source/src/TWUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2007-2022 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
Copyright (C) 2007-2024 Jonathan Kew, Stefan Löffler, Charlie Sharpsteen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
7 changes: 4 additions & 3 deletions Programs/Editors/TeXworks/source/src/TeXDocumentWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2684,20 +2684,21 @@ void TeXDocumentWindow::copyToFind()
{
if (textEdit->textCursor().hasSelection()) {
QString searchText = textEdit->textCursor().selectedText();
searchText.replace(QChar(0x2029), QChar::fromLatin1('\n'));
searchText.replace(QChar::ParagraphSeparator, QChar::LineFeed); // 0x2029 -> \n

Tw::Settings settings;
// Note: To search for multi-line strings, we currently need regex
// enabled (since we only have a single search line). If it was not
// enabled, we also need to ensure that the replaceText is escaped
// properly
bool isMultiLine = searchText.contains(QChar::fromLatin1('\n'));
const bool isMultiLine = searchText.contains(QChar::LineFeed);
if (isMultiLine && !settings.value(QString::fromLatin1("searchRegex")).toBool()) {
settings.setValue(QString::fromLatin1("searchRegex"), true);
settings.setValue(QString::fromLatin1("replaceText"), QRegularExpression::escape(settings.value(QString::fromLatin1("replaceText")).toString()));
}
if (settings.value(QString::fromLatin1("searchRegex")).toBool()) {
if (isMultiLine)
settings.setValue(QString::fromLatin1("searchText"), QRegularExpression::escape(searchText).replace(QChar::fromLatin1('\n'), QLatin1String("\\n")));
settings.setValue(QString::fromLatin1("searchText"), QRegularExpression::escape(searchText).replace(QStringLiteral("\\\n"), QStringLiteral("\\n")));
else
settings.setValue(QString::fromLatin1("searchText"), QRegularExpression::escape(searchText));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2019-2020 Stefan Löffler
Copyright (C) 2019-2024 Stefan Löffler

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2019-2020 Stefan Löffler
Copyright (C) 2019-2024 Stefan Löffler

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2019-2020 Stefan Löffler
Copyright (C) 2019-2024 Stefan Löffler

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion Programs/Editors/TeXworks/source/src/utils/IniConfig.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2024 Stefan Löffler
Copyright (C) 2019-2024 Stefan Löffler

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down

0 comments on commit a1fd200

Please sign in to comment.