diff --git a/bread_editor/editor.py b/bread_editor/editor.py index f5e5c87..64d99f9 100644 --- a/bread_editor/editor.py +++ b/bread_editor/editor.py @@ -55,6 +55,11 @@ class BitEditor: self.font.setLetterSpacing(QFont.SpacingType.PercentageSpacing, spacing) self.input.setFont(self.font) + self.cursor_width = self.input.fontMetrics().averageCharWidth() + + # set the cursor with to match the letter spacing + self.input.setCursorWidth(self.cursor_width + 1) # + 1 because else it somehow draws a 1px wide vertical line + highlight_ones = self.app.settings.highlight_ones highlighter_document = self.input.document() if highlight_ones else None