mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Edit Book: Allow putting the editor into replace mode by pressing the Insert key
This commit is contained in:
parent
f337a57435
commit
e4024b8b05
@ -660,6 +660,10 @@ class TextEdit(PlainTextEdit):
|
||||
if self.replace_possible_unicode_sequence():
|
||||
ev.accept()
|
||||
return
|
||||
if ev.key() == Qt.Key_Insert:
|
||||
self.setOverwriteMode(self.overwriteMode() ^ True)
|
||||
ev.accept()
|
||||
return
|
||||
QPlainTextEdit.keyPressEvent(self, ev)
|
||||
if (ev.key() == Qt.Key_Semicolon or ';' in unicode(ev.text())) and tprefs['replace_entities_as_typed'] and self.syntax == 'html':
|
||||
self.replace_possible_entity()
|
||||
|
Loading…
x
Reference in New Issue
Block a user