Release 1.6.4 (#1120)
This commit is contained in:
@@ -1,5 +1,24 @@
|
||||
# novelWriter Changelog
|
||||
|
||||
## Version 1.6.4 [2022-09-29]
|
||||
|
||||
### Release Notes
|
||||
|
||||
This is a bugfix release that fixes a critical bug in the insert non-breaking spaces feature. It
|
||||
basically no longer worked in the 1.6.3 release. This release also fixes a minor issue where the
|
||||
text cursor sometimes dissappears when reaching the right-hand edge of the text editor window.
|
||||
|
||||
### Detailed Changelog
|
||||
|
||||
**Bugfixes**
|
||||
|
||||
* Fixed a bug in the auto-replace feature of the editor that caused a crash when using the insert
|
||||
non-breaking spaces feature was used. Issue #1118. PR #1120.
|
||||
* Backported a bugfix from 1.7 RC1 that resolves an issue with the text cursor sometimes
|
||||
dissappearing at the right-hand edge of the text editor. Issues #1112 and #1119. PR #1120.
|
||||
|
||||
----
|
||||
|
||||
## Version 1.6.3 [2022-08-18]
|
||||
|
||||
### Release Notes
|
||||
|
||||
@@ -60,9 +60,9 @@ __license__ = "GPLv3"
|
||||
__author__ = "Veronica Berglyd Olsen"
|
||||
__maintainer__ = "Veronica Berglyd Olsen"
|
||||
__email__ = "code@vkbo.net"
|
||||
__version__ = "1.6.3"
|
||||
__hexversion__ = "0x010603f0"
|
||||
__date__ = "2022-08-18"
|
||||
__version__ = "1.6.4"
|
||||
__hexversion__ = "0x010604f0"
|
||||
__date__ = "2022-09-29"
|
||||
__status__ = "Stable"
|
||||
__domain__ = "novelwriter.io"
|
||||
__url__ = "https://novelwriter.io"
|
||||
|
||||
@@ -64,5 +64,11 @@ the slider splitting the editor and viewer panels can no longer be dragged until
|
||||
disappears. It was not necessarily obvious how the viewer panel could be restored in such cases.
|
||||
</p>
|
||||
|
||||
<h3>Patch 1.6.4 – 29 September 2022</h3>
|
||||
|
||||
<p>This is a bugfix release that fixes a critical bug in the insert non-breaking spaces feature. It
|
||||
basically no longer worked in the 1.6.3 release. This release also fixes a minor issue where the
|
||||
text cursor sometimes dissappears when reaching the right-hand edge of the text editor window.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -91,6 +91,7 @@ class GuiDocEditor(QTextEdit):
|
||||
|
||||
self._spellCheck = False # Flag for spell checking enabled
|
||||
self._nonWord = "\"'" # Characters to not include in spell checking
|
||||
self._vpMargin = 0 # The editor viewport margin, set during init
|
||||
|
||||
# Document Variables
|
||||
self._charCount = 0 # Character count
|
||||
@@ -268,10 +269,12 @@ class GuiDocEditor(QTextEdit):
|
||||
self.docHeader.matchColours()
|
||||
self.docFooter.matchColours()
|
||||
|
||||
# Set default text margins
|
||||
cM = self.mainConf.getTextMargin()
|
||||
qDoc.setDocumentMargin(0)
|
||||
self.setViewportMargins(cM, cM, cM, cM)
|
||||
# Due to cursor visibility, a part of the margin must be
|
||||
# allocated to the document itself. See issue #1112.
|
||||
cW = self.cursorWidth()
|
||||
qDoc.setDocumentMargin(cW)
|
||||
self._vpMargin = max(self.mainConf.getTextMargin() - cW, 0)
|
||||
self.setViewportMargins(self._vpMargin, self._vpMargin, self._vpMargin, self._vpMargin)
|
||||
|
||||
# Also set the document text options for the document text flow
|
||||
theOpt = QTextOption()
|
||||
@@ -533,7 +536,6 @@ class GuiDocEditor(QTextEdit):
|
||||
"""
|
||||
wW = self.width()
|
||||
wH = self.height()
|
||||
cM = self.mainConf.getTextMargin()
|
||||
|
||||
vBar = self.verticalScrollBar()
|
||||
sW = vBar.width() if vBar.isVisible() else 0
|
||||
@@ -541,10 +543,10 @@ class GuiDocEditor(QTextEdit):
|
||||
hBar = self.horizontalScrollBar()
|
||||
sH = hBar.height() if hBar.isVisible() else 0
|
||||
|
||||
tM = cM
|
||||
tM = self._vpMargin
|
||||
if self.mainConf.textWidth > 0 or self.theParent.isFocusMode:
|
||||
tW = self.mainConf.getTextWidth(self.theParent.isFocusMode)
|
||||
tM = max((wW - sW - tW)//2, cM)
|
||||
tM = max((wW - sW - tW)//2, self._vpMargin)
|
||||
|
||||
tB = self.frameWidth()
|
||||
tW = wW - 2*tB - sW
|
||||
@@ -561,8 +563,8 @@ class GuiDocEditor(QTextEdit):
|
||||
rL = wW - sW - rW - 2*tB
|
||||
self.docSearch.move(rL, 2*tB)
|
||||
|
||||
uM = max(cM, tH, rH)
|
||||
lM = max(cM, fH)
|
||||
uM = max(self._vpMargin, tH, rH)
|
||||
lM = max(self._vpMargin, fH)
|
||||
self.setViewportMargins(tM, uM, tM, lM)
|
||||
|
||||
return
|
||||
@@ -1982,12 +1984,12 @@ class GuiDocEditor(QTextEdit):
|
||||
|
||||
tCheck = tInsert
|
||||
if tCheck in self.mainConf.fmtPadBefore:
|
||||
if self.allowSpaceBeforeColon(theText, tCheck):
|
||||
if self._allowSpaceBeforeColon(theText, tCheck):
|
||||
nDelete = max(nDelete, 1)
|
||||
tInsert = self._typPadChar + tInsert
|
||||
|
||||
if tCheck in self.mainConf.fmtPadAfter:
|
||||
if self.allowSpaceBeforeColon(theText, tCheck):
|
||||
if self._allowSpaceBeforeColon(theText, tCheck):
|
||||
nDelete = max(nDelete, 1)
|
||||
tInsert = tInsert + self._typPadChar
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<novelWriterXML appVersion="1.6.2" hexVersion="0x010602f0" fileVersion="1.3" timeStamp="2022-08-18 20:38:04">
|
||||
<novelWriterXML appVersion="1.6.4" hexVersion="0x010604f0" fileVersion="1.3" timeStamp="2022-09-29 19:23:00">
|
||||
<project>
|
||||
<name>Sample Project</name>
|
||||
<title>Sample Project</title>
|
||||
<author>Jane Smith</author>
|
||||
<author>Jay Doh</author>
|
||||
<saveCount>1304</saveCount>
|
||||
<saveCount>1305</saveCount>
|
||||
<autoCount>199</autoCount>
|
||||
<editTime>65055</editTime>
|
||||
<editTime>65071</editTime>
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>False</doBackup>
|
||||
|
||||
@@ -27,6 +27,14 @@ This is another paragraph of much longer nonsense text. It is in fact 1 very ver
|
||||
|
||||
‘Full line single quoted text.’
|
||||
|
||||
Some “ double quoted text with spaces padded ”.
|
||||
|
||||
@object: NoSpaceAdded
|
||||
|
||||
% synopsis: No space before this colon.
|
||||
|
||||
Add space before this colon : See?
|
||||
|
||||
“Tab-indented text”
|
||||
|
||||
>“Paragraph-indented text”
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<novelWriterXML appVersion="1.5-beta2" hexVersion="0x010500b2" fileVersion="1.3" timeStamp="2021-08-31 00:03:45">
|
||||
<novelWriterXML appVersion="1.6.3" hexVersion="0x010603f0" fileVersion="1.3" timeStamp="2022-09-29 14:24:23">
|
||||
<project>
|
||||
<name>New Project</name>
|
||||
<title></title>
|
||||
@@ -15,8 +15,8 @@
|
||||
<autoOutline>True</autoOutline>
|
||||
<lastEdited>0e17daca5f3e1</lastEdited>
|
||||
<lastViewed>None</lastViewed>
|
||||
<lastWordCount>126</lastWordCount>
|
||||
<novelWordCount>99</novelWordCount>
|
||||
<lastWordCount>142</lastWordCount>
|
||||
<novelWordCount>115</novelWordCount>
|
||||
<notesWordCount>27</notesWordCount>
|
||||
<autoReplace/>
|
||||
<titleFormat>
|
||||
@@ -85,10 +85,10 @@
|
||||
<status>New</status>
|
||||
<exported>True</exported>
|
||||
<layout>DOCUMENT</layout>
|
||||
<charCount>612</charCount>
|
||||
<wordCount>95</wordCount>
|
||||
<paraCount>10</paraCount>
|
||||
<cursorPos>768</cursorPos>
|
||||
<charCount>693</charCount>
|
||||
<wordCount>111</wordCount>
|
||||
<paraCount>12</paraCount>
|
||||
<cursorPos>917</cursorPos>
|
||||
</item>
|
||||
<item handle="44cb730c42048" order="1" parent="None">
|
||||
<name>Plot</name>
|
||||
|
||||
@@ -340,6 +340,9 @@ 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)
|
||||
|
||||
# Auto-Replace
|
||||
# ============
|
||||
|
||||
for c in (
|
||||
"This is another paragraph of much longer nonsense text. "
|
||||
"It is in fact 1 very very NONSENSICAL nonsense text! "
|
||||
@@ -373,6 +376,41 @@ 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)
|
||||
|
||||
# Insert spaces before and after quotes
|
||||
nwGUI.mainConf.fmtPadBefore = "\u201d"
|
||||
nwGUI.mainConf.fmtPadAfter = "\u201c"
|
||||
|
||||
for c in "Some \"double quoted text with spaces padded\".":
|
||||
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)
|
||||
|
||||
nwGUI.mainConf.fmtPadBefore = ""
|
||||
nwGUI.mainConf.fmtPadAfter = ""
|
||||
|
||||
# Insert spaces before colon, but ignore tags and synopsis
|
||||
nwGUI.mainConf.fmtPadBefore = ":"
|
||||
|
||||
for c in "@object: NoSpaceAdded":
|
||||
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 "% synopsis: No space before this colon.":
|
||||
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 "Add space before this colon: See?":
|
||||
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)
|
||||
|
||||
nwGUI.mainConf.fmtPadBefore = ""
|
||||
|
||||
# Indent and Align
|
||||
# ================
|
||||
|
||||
for c in "\t\"Tab-indented text\"":
|
||||
qtbot.keyClick(nwGUI.docEditor, c, delay=typeDelay)
|
||||
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay)
|
||||
|
||||
Reference in New Issue
Block a user