Skip to content

Commit eb961e0

Browse files
Merge pull request #1805 from contour-terminal/fix/minors
Addresses failed Precondition when rendering vertically overflowing glyphs
2 parents a908082 + b349139 commit eb961e0

File tree

15 files changed

+26
-45
lines changed

15 files changed

+26
-45
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ jobs:
122122
run: |
123123
wget https://apt.llvm.org/llvm.sh
124124
chmod +x llvm.sh
125-
sudo ./llvm.sh 20
126-
sudo apt-get install clang-format-20
125+
sudo ./llvm.sh 21
126+
sudo apt-get install clang-format-21
127127
- name: "Clang-format"
128-
run: find ./src/ -name "*.cpp" -o -name "*.h" | xargs clang-format-20 --Werror --dry-run
128+
run: find ./src/ -name "*.cpp" -o -name "*.h" | xargs clang-format-21 --Werror --dry-run
129129
- name: "Check includes"
130130
run: ./scripts/check-includes.sh
131131

metainfo.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
<li>Fixes empty history jump (#1781)</li>
120120
<li>Fixes double line box drawing characters</li>
121121
<li>Fixes DECRQM (DEC Request Mode) response (#1797)</li>
122+
<li>Fixes Precondition failure when rendering vertically overflowing glyphs (#1805)</li>
122123
<li>Enables customizing predefined color palette (#1763)</li>
123124
<li>Ensure inserting new tabs happens right next to the currently active tab (#1695)</li>
124125
<li>Allow glyphs to underflow if they are not bigger than the cell size (#1603)</li>

src/contour/Actions.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@ namespace documentation
288288
#if defined(__clang__) && __clang_major__ >= 19
289289
constexpr
290290
#endif
291-
inline auto
292-
getDocumentation()
291+
inline auto getDocumentation()
293292
{
294293
return std::array {
295294
std::tuple { Action { CancelSelection {} }, documentation::CancelSelection },

src/text_shaper/directwrite_locator.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,7 @@ struct directwrite_locator::Private
114114
}
115115
};
116116

117-
directwrite_locator::directwrite_locator():
118-
_d { new Private(), [](Private* p) {
119-
delete p;
120-
} }
117+
directwrite_locator::directwrite_locator(): _d { new Private(), [](Private* p) { delete p; } }
121118
{
122119
}
123120

src/text_shaper/fontconfig_locator.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,7 @@ struct fontconfig_locator::private_tag
149149
}
150150
};
151151

152-
fontconfig_locator::fontconfig_locator():
153-
_d { new private_tag(), [](private_tag* p) {
154-
delete p;
155-
} }
152+
fontconfig_locator::fontconfig_locator(): _d { new private_tag(), [](private_tag* p) { delete p; } }
156153
{
157154
}
158155

src/text_shaper/open_shaper.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,7 @@ struct open_shaper::private_open_shaper // {{{
487487
}
488488

489489
private_open_shaper(DPI dpi, font_locator& locator):
490-
ftCleanup { [this]() {
491-
FT_Done_FreeType(ft);
492-
} },
490+
ftCleanup { [this]() { FT_Done_FreeType(ft); } },
493491
locator { &locator },
494492
dpi { dpi },
495493
hbBuf(hb_buffer_create(), [](auto p) { hb_buffer_destroy(p); }),

src/vtbackend/ColorPalette.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ bool defaultColorPalettes(std::string const& colorPaletteName, ColorPalette& pal
8383

8484
// TODO add dim colors, do we need to adapt them to each of color palettes?
8585
std::map<std::string, std::function<void()>> const definedColorPalettes = {
86-
{ "contour",
87-
[&]() {
88-
} },
86+
{ "contour", [&]() {} },
8987
{ "monokai",
9088
[&]() {
9189
// Monokai dark colors

src/vtbackend/Screen.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,7 @@ void Screen<Cell>::writeText(string_view text, size_t cellCount)
470470

471471
// Do not log individual characters, as we already logged the whole string above
472472
_logCharTrace = false;
473-
auto const _ = crispy::finally { [&]() {
474-
_logCharTrace = true;
475-
} };
473+
auto const _ = crispy::finally { [&]() { _logCharTrace = true; } };
476474
#endif
477475

478476
assert(cellCount <= static_cast<size_t>(pageSize().columns.value - _cursor.position.column.value));

src/vtbackend/Terminal.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,7 @@ Terminal::Terminal(Events& eventListener,
157157
_effectiveImageCanvasSize { _settings.maxImageSize },
158158
_sixelColorPalette { std::make_shared<SixelColorPalette>(_maxSixelColorRegisters,
159159
_maxSixelColorRegisters) },
160-
_imagePool { [this](Image const* image) {
161-
discardImage(*image);
162-
} },
160+
_imagePool { [this](Image const* image) { discardImage(*image); } },
163161
_hyperlinks { .cache = HyperlinkCache { 1024 } },
164162
_sequenceBuilder { ModeDependantSequenceHandler { *this }, TerminalInstructionCounter { *this } },
165163
_parser { std::ref(_sequenceBuilder) },

src/vtbackend/VTWriter.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,12 @@ VTWriter::VTWriter(Writer writer): _writer { std::move(writer) }
1717
}
1818

1919
VTWriter::VTWriter(std::ostream& output):
20-
VTWriter { [&](char const* d, size_t n) {
21-
output.write(d, static_cast<std::streamsize>(n));
22-
} }
20+
VTWriter { [&](char const* d, size_t n) { output.write(d, static_cast<std::streamsize>(n)); } }
2321
{
2422
}
2523

2624
VTWriter::VTWriter(std::vector<char>& output):
27-
VTWriter { [&](char const* d, size_t n) {
28-
output.insert(output.end(), d, d + n);
29-
} }
25+
VTWriter { [&](char const* d, size_t n) { output.insert(output.end(), d, d + n); } }
3026
{
3127
}
3228

0 commit comments

Comments
 (0)