Merge 1.6.4 (#1121)
This commit is contained in:
@@ -89,6 +89,25 @@ final release.
|
||||
|
||||
----
|
||||
|
||||
## 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 disappears 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.
|
||||
* Back ported a bugfix from 1.7 RC1 that resolves an issue with the text cursor sometimes
|
||||
disappearing at the right-hand edge of the text editor. Issues #1112 and #1119. PR #1120.
|
||||
|
||||
----
|
||||
|
||||
## Version 1.6.3 [2022-08-18]
|
||||
|
||||
### Release Notes
|
||||
|
||||
@@ -1994,12 +1994,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
|
||||
|
||||
|
||||
@@ -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,12 +1,12 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-07-31 18:44:39">
|
||||
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-09-29 19:57:40">
|
||||
<project>
|
||||
<name>New Project</name>
|
||||
<title>New Novel</title>
|
||||
<author>Jane Doe</author>
|
||||
<saveCount>4</saveCount>
|
||||
<autoCount>2</autoCount>
|
||||
<editTime>3</editTime>
|
||||
<editTime>4</editTime>
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>True</doBackup>
|
||||
@@ -17,8 +17,8 @@
|
||||
<lastViewed>None</lastViewed>
|
||||
<lastNovel>0000000000008</lastNovel>
|
||||
<lastOutline>0000000000008</lastOutline>
|
||||
<lastWordCount>129</lastWordCount>
|
||||
<novelWordCount>102</novelWordCount>
|
||||
<lastWordCount>145</lastWordCount>
|
||||
<novelWordCount>118</novelWordCount>
|
||||
<notesWordCount>27</notesWordCount>
|
||||
<autoReplace/>
|
||||
<titleFormat>
|
||||
@@ -59,7 +59,7 @@
|
||||
<name status="s000000" import="i000004" exported="True">New Chapter</name>
|
||||
</item>
|
||||
<item handle="000000000000f" parent="000000000000d" root="0000000000008" order="1" type="FILE" class="NOVEL" layout="DOCUMENT">
|
||||
<meta expanded="False" charCount="612" wordCount="95" paraCount="10" cursorPos="768"/>
|
||||
<meta expanded="False" charCount="693" wordCount="111" paraCount="12" cursorPos="917"/>
|
||||
<name status="s000000" import="i000004" exported="True">New Scene</name>
|
||||
</item>
|
||||
<item handle="0000000000009" parent="None" root="0000000000009" order="1" type="ROOT" class="PLOT">
|
||||
|
||||
@@ -373,6 +373,9 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, fncProj, refDir, outDir, mock
|
||||
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! "
|
||||
@@ -406,6 +409,41 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, fncProj, refDir, outDir, mock
|
||||
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