There were two bugs with the previous implementation
one is that it didn't took in consideration the
Profile -> Mouse -> Advanced -> Underline Files
With that enabled, right click on the name of the folder
would give you a Open Folder With entry, so we would
end with two actions.
The other bug also triggered when that setting is enabled:
we never marked the Open Folder With for removal, after
inserting the menu for the underlined file.
our childEvent checks if we have zero or one entities
and then cleans the view of uneeded elements. But when we are
moving a TerminalDisplay around it will temporarely have only
one element, and starts to clean / delete things around.
We do not want this during the split move
Korean Hangul can be represented in Unicode either as precomposed Hangul
syllables, or as sequences of alphabetic components called Jamo.
Syllables should occupy 2 cells (there are halfwidth variants at
U+FFA0..U+FFDF). A fully decomposed syllable consists of an initial
jamo (choseong - leading consonant - may be a filler U+115F), a medial
jamo (jungseong - vowel - may be a filler U+1160), and an optional final
jamo (jongseong - trailing consonant). Old Korean can have more than
one of each of those. In any case, to make the total width 2, we assign
width 2 to choseong, and 0 to jungseong and jongseong, which, absent a
context-aware wcswidth, will still break with Old Korean syllables with
more than one jamo for leading consonants.
This aligns with glibc:
commit 7a79e321c6f85b204036c33d85f6b2aa794e7c76
Author: Thorsten Glaser <tg@mirbsd.de>
Date: Fri Jul 14 14:02:50 2017 +0200
Refresh generated charmap data and ChangeLog
[BZ #21750]
* charmaps/UTF-8: Refresh.
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 04ef5ad071..9e05b4a652 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,17 @@
+2017-07-14 Thorsten Glaser <tg@mirbsd.de>
+
+ [BZ #21750]
+ * charmaps/UTF-8: Refresh.
+ * unicode-gen/utf8_gen.py (U+00AD): Set width to 1.
+ * unicode-gen/utf8_gen.py (U+1160..U+11FF): Set width to 0.
+ * unicode-gen/utf8_gen.py (U+3248..U+324F): Set width to 2.
+ * unicode-gen/utf8_gen.py (U+4DC0..U+4DFF): Likewise.
+ * unicode-gen/utf8_gen.py: Treat category Me and Mn as combining.
+ [BZ #19852]
+ * unicode-gen/utf8_gen.py: Process EastAsianWidth lines before
+ UnicodeData lines so the latter have precedence; remove hack
+ to group output by EastAsianWidth ranges.
+
[ ... snip ...]
commit 6e540caa21616d5ec5511fafb22819204525138e
Author: Mike FABIAN <mfabian@redhat.com>
Date: Tue Jun 16 08:29:40 2020 +0200
Set width of JUNGSEONG/JONGSEONG characters from UD7B0 to UD7FB to 0 [BZ #26120]
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
diff --git a/localedata/charmaps/UTF-8 b/localedata/charmaps/UTF-8
index 14c5d4fa33..8cce47cd97 100644
--- a/localedata/charmaps/UTF-8
+++ b/localedata/charmaps/UTF-8
@@ -48920,6 +48920,8 @@ WIDTH
<UABE8> 0
<UABED> 0
<UAC00>...<UD7A3> 2
+<UD7B0>...<UD7C6> 0
+<UD7CB>...<UD7FB> 0
<UF900>...<UFA6D> 2
<UFA70>...<UFAD9> 2
<UFB1E> 0
Changes in width for new assigned characters.
The only assigned character which changes width is:
U+1734 HANUNOO SIGN PAMUDPOD
which changes its width from 0 to 1.
Summary of changes:
#
# Characters count for each width:
# -1: 2112
-# 0: 2014
-# 1: 927527
-# 2: 182459
+# 0: 2127
+# 1: 927360
+# 2: 182513
#
# Ranges count for each width:
# -1: 3
-# 0: 340
-# 1: 452
-# 2: 117
+# 0: 349
+# 1: 466
+# 2: 122
So:
+113 characters with width 0
-167 characters with width 1
+ 54 characters with width 2
The template system used for generating CharacterWidth.cpp and
clang-format don't interact that well.
So, repair the things that clang-format broke, disable clang-format for
sections using templates, and don't reenable clang-format until its
notion of indentation is sane.
After this commit the generated file can be easily compared with a
pre-clang-format version:
git diff 7e1b31cd src/characters/CharacterWidth.cpp
The only differences are new clang-format off/on annotations and a few
formatting fixes.
TerminalPainter already takes care of calculating blended colors when
"Always invert the colors of selected text" is off. Move there also the
swapping of fg/bg colors for the inverted colors kind of selections.
This removes one reference to TerminalDisplay from Screen. There is
still another one to support reflow for some zsh configurations.
Every time the selection is changed, the selection text is retrieved to
check whether to enable or disable the copy actions. Besides that, the
selection text is also used for the web search context menu entries.
Better just check if the selection is empty and make a note that the
selection changed, so the next time the context menu is invoked it can
retrieve the current selection text, which should happen much less often
than selection changes.
If the "Trim leading spaces" option is set, we can pass a pointer to the
first non-space character to decodeLine(), no need to first move memory
around.
PlainTextDecoder::decodeLine() was creating a new QString via
QString::fromUcs4() for every character. Instead, accumulate the
characters in a QVector<uint>, and call QString::fromUcs4() once at the
end of the function.
- Hoist _columns access out of loop.
- Make copyFromScreen more similar to copyFromHistory.
- Use std::copy and std::fill instead of explicit loops.
Prompted by suggestions by Waqar Ahmed.
The profile was checked for every selected character to learn whether it
should be rendered with inverted foreground and background colors, or
with blended colors.
ViewSplitter was creating widgets of inconsistent sizes after adding/removing them in Konsole.
This change forces the active splitter to always be updated with the appropriate even-spacing size for the widgets.
As a drawback, manual changes to sizes will be overwritten when a new widget is added if no new splitter needs to be instantiated.
BUG: 447074
Was already taken care of by Screen::Screen(lines, columns) calling
Screen::reset(), which calls Screen::saveCursor() after resetting
_currentModes[MODE_Origin].
* When using i18n you don't .arg(), the parameter goes inside the i18n
call
* xgettext doesn't seem to be able to parse the ternary operator inside
the i18n call so put it outside, otherwise the second string is not
extracted for translation
(cherry picked from commit 4d635d9aa3786637bbe7ad2b4ec2f369f4ed1436)