Fix newline after URL keeps URL formatting

This commit is contained in:
Miguel Jacq 2025-11-08 14:52:22 +11:00
parent 1373c4ab06
commit 31604a0cd2
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
3 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,7 @@
# 0.1.12.1
* Fix newline after URL keeps URL style formatting
# 0.1.12 # 0.1.12
* Add find bar for searching for text in the editor * Add find bar for searching for text in the editor

View file

@ -690,6 +690,12 @@ class Editor(QTextEdit):
self._apply_normal_typing() # make the *new* paragraph Normal for typing self._apply_normal_typing() # make the *new* paragraph Normal for typing
return return
# If we were at end-of-line, make the *new* line plain (dont keep URL styling)
if not c.hasSelection() and c.atBlockEnd():
super().keyPressEvent(e) # insert the new paragraph
self._break_anchor_for_next_char() # clear anchor/underline/color for typing
return
# otherwise default handling # otherwise default handling
return super().keyPressEvent(e) return super().keyPressEvent(e)

View file

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "bouquin" name = "bouquin"
version = "0.1.12" version = "0.1.12.1"
description = "Bouquin is a simple, opinionated notebook application written in Python, PyQt and SQLCipher." description = "Bouquin is a simple, opinionated notebook application written in Python, PyQt and SQLCipher."
authors = ["Miguel Jacq <mig@mig5.net>"] authors = ["Miguel Jacq <mig@mig5.net>"]
readme = "README.md" readme = "README.md"