diff options
| author | Crystalwarrior <varsash@gmail.com> | 2021-04-20 00:24:14 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2021-04-20 00:24:14 +0300 |
| commit | 9a20143e222cab8ddce8d0f8e47421e4805b285e (patch) | |
| tree | 14e1f07756907ac21df1bd222805492100594bed | |
| parent | 8f0913d30e5ed1cd6a9ee5f7f8b82d68f7630395 (diff) | |
Fix ~~, ~> and <> breaking tick pos
| -rw-r--r-- | src/courtroom.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 8ffd2b5c..3950cb6e 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -3361,21 +3361,8 @@ void Courtroom::chat_tick() // Alignment characters if (tick_pos < 2) { - if (f_rest.startsWith("~~")) { - tick_pos = f_rest.indexOf("~~"); - f_rest.remove(tick_pos, 2); + if (f_rest.startsWith("~~") || f_rest.startsWith("~>") || f_rest.startsWith("<>")) tick_pos += 2; - } - else if (f_rest.startsWith("~>")) { - tick_pos = f_rest.indexOf("~>"); - f_rest.remove(tick_pos, 2); - tick_pos += 2; - } - else if (f_rest.startsWith("<>")) { - tick_pos = f_rest.indexOf("<>"); - f_rest.remove(tick_pos, 2); - tick_pos += 2; - } } f_rest.remove(0, tick_pos); QTextBoundaryFinder tbf(QTextBoundaryFinder::Grapheme, f_rest); |
