Merge patch 1.4.2

This commit is contained in:
Veronica Berglyd Olsen
2021-08-31 00:04:40 +02:00
6 changed files with 87 additions and 12 deletions
+16
View File
@@ -186,6 +186,22 @@ careful when using this version on live writing projects, and make sure you make
----
## Version 1.4.2 [2021-08-30]
### Release Notes
This is a patch release fixing an issue with the auto-replace feature for single and double quotes.
The issue appears when using the new indent and text alignment codes followed by a quote symbol,
and quotes following a tab or non-breaking space.
**Bugfixes**
* Any single or double straight quote following a whitespace other than a regular space, or a left
indent or right align set of angle bracket codes without a space following them, would be
erroneously replaced by a closing quote instead of an opening quote. Issue #874.
----
## Version 1.4.1 [2021-07-27]
### Release Notes
+11 -2
View File
@@ -2,14 +2,23 @@
<html>
<body>
<h2>Release Notes for 1.4.2</h2>
<p><i>Released on 30 August 2021</i></p>
<p>This is a patch release fixing an issue with the auto-replace feature for single and double
quotes. The issue appears when using the new indent and text alignment codes followed by a quote
symbol, and quotes following a tab or non-breaking space.</p>
<p><i>See also the <a href="https://github.com/vkbo/novelWriter/releases">Releases</a> page.</i></p>
<hr/>
<h2>Release Notes for 1.4.1</h2>
<p><i>Released on 27 July 2021</i></p>
<p>This release fixes a couple of minor issue with some of the dialog boxes. The fix was
accidentally left out of release 1.4.</p>
<p><i>See also the <a href="https://github.com/vkbo/novelWriter/releases">Releases</a> page.</i></p>
<hr/>
<h2>Release Notes for 1.4</h2>
+10 -2
View File
@@ -1807,7 +1807,7 @@ class GuiDocEditor(QTextEdit):
nDelete = 0
tInsert = theOne
if self.mainConf.doReplaceDQuote and theTwo == ' "':
if self.mainConf.doReplaceDQuote and theTwo[:1].isspace() and theTwo.endswith('"'):
nDelete = 1
tInsert = self._typDQOpen
@@ -1815,10 +1815,14 @@ class GuiDocEditor(QTextEdit):
nDelete = 1
if thePos == 1:
tInsert = self._typDQOpen
elif thePos == 2 and theTwo == '>"':
tInsert = self._typDQOpen
elif thePos == 3 and theThree == '>>"':
tInsert = self._typDQOpen
else:
tInsert = self._typDQClose
elif self.mainConf.doReplaceSQuote and theTwo == " '":
elif self.mainConf.doReplaceSQuote and theTwo[:1].isspace() and theTwo.endswith("'"):
nDelete = 1
tInsert = self._typSQOpen
@@ -1826,6 +1830,10 @@ class GuiDocEditor(QTextEdit):
nDelete = 1
if thePos == 1:
tInsert = self._typSQOpen
elif thePos == 2 and theTwo == ">'":
tInsert = self._typSQOpen
elif thePos == 3 and theThree == ">>'":
tInsert = self._typSQOpen
else:
tInsert = self._typSQClose
@@ -27,3 +27,15 @@ This is another paragraph of much longer nonsense text. It is in fact 1 very ver
Full line single quoted text.
“Tab-indented text”
>“Paragraph-indented text”
>>“Right-aligned text”
Tab-indented text
>Paragraph-indented text
>>Right-aligned text
@@ -1,11 +1,11 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="1.5-alpha0" hexVersion="0x010500a0" fileVersion="1.2" timeStamp="2021-08-02 02:50:31">
<novelWriterXML appVersion="1.5-beta2" hexVersion="0x010500b2" fileVersion="1.3" timeStamp="2021-08-31 00:03:45">
<project>
<name>New Project</name>
<title></title>
<saveCount>5</saveCount>
<autoCount>2</autoCount>
<editTime>3</editTime>
<editTime>4</editTime>
</project>
<settings>
<doBackup>True</doBackup>
@@ -15,8 +15,8 @@
<autoOutline>True</autoOutline>
<lastEdited>0e17daca5f3e1</lastEdited>
<lastViewed>None</lastViewed>
<lastWordCount>114</lastWordCount>
<novelWordCount>87</novelWordCount>
<lastWordCount>126</lastWordCount>
<novelWordCount>99</novelWordCount>
<notesWordCount>27</notesWordCount>
<autoReplace/>
<titleFormat>
@@ -85,10 +85,10 @@
<status>New</status>
<exported>True</exported>
<layout>DOCUMENT</layout>
<charCount>482</charCount>
<wordCount>83</wordCount>
<paraCount>4</paraCount>
<cursorPos>620</cursorPos>
<charCount>612</charCount>
<wordCount>95</wordCount>
<paraCount>10</paraCount>
<cursorPos>768</cursorPos>
</item>
<item handle="44cb730c42048" order="1" parent="None">
<name>Plot</name>
+30
View File
@@ -286,6 +286,36 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, fncProj, refDir, outDir):
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
for c in "\t\"Tab-indented text\"":
qtbot.keyClick(nwGUI.docEditor, c, delay=typeDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
for c in ">\"Paragraph-indented text\"":
qtbot.keyClick(nwGUI.docEditor, c, delay=typeDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
for c in ">>\"Right-aligned text\"":
qtbot.keyClick(nwGUI.docEditor, c, delay=typeDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
for c in "\t'Tab-indented text'":
qtbot.keyClick(nwGUI.docEditor, c, delay=typeDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
for c in ">'Paragraph-indented text'":
qtbot.keyClick(nwGUI.docEditor, c, delay=typeDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
for c in ">>'Right-aligned text'":
qtbot.keyClick(nwGUI.docEditor, c, delay=typeDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
qtbot.wait(stepDelay)
nwGUI.docEditor.wCounter.run()
qtbot.wait(stepDelay)