Skip to content

Commit

Permalink
note_buffer: Don't use the length variable
Browse files Browse the repository at this point in the history
It's not accurate. It's probably expressed in bytes.
It's equal to 1 only for normal characters, but 2 for special ones
such as é, è...etc.

Fixes linuxmint/mint21.3-beta#28
  • Loading branch information
clefebvre committed Jan 4, 2024
1 parent ffc34f0 commit 3c62ce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usr/lib/sticky/note_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def do_insert_text(self, location, text, length):
next_char.forward_char()

# check tag toggles
if length == 1:
if len(text) == 1:
font_scale_changed = False
for tag_name in self.tag_toggles:
# if the tag is a font scale, remove all other font scales
Expand Down

0 comments on commit 3c62ce7

Please sign in to comment.