diff --git a/metainfo.xml b/metainfo.xml index da10ee64dc..28e028807f 100644 --- a/metainfo.xml +++ b/metainfo.xml @@ -113,6 +113,8 @@
  • Add generation of config file from internal state (#1282)
  • Add SGRSAVE and SGRRESTORE VT sequences to save and restore SGR state (They intentionally conflict with XTPUSHSGR and XTPOPSGR)
  • Update of contour.desktop file (#1423)
  • +
  • Fixed forwarding of input while in normal mode (#1468)
  • +
  • Fixed overlap of glyphs for long codepoints (#1349)
  • Fixed too verbose info during ssh session login (#1447)
  • Fixes corruption of sixel image on high resolution (#1049)
  • Fixes bad wording of OS/X to macOS (#1462)
  • diff --git a/src/text_shaper/open_shaper.cpp b/src/text_shaper/open_shaper.cpp index 3c92082629..c060ad30bc 100644 --- a/src/text_shaper/open_shaper.cpp +++ b/src/text_shaper/open_shaper.cpp @@ -389,6 +389,7 @@ namespace gpos.presentation = presentation; result.emplace_back(gpos); } + return crispy::none_of(result, glyphMissing); } } // namespace diff --git a/src/vtbackend/Terminal.h b/src/vtbackend/Terminal.h index ecb16573a9..d92dc1e6b8 100644 --- a/src/vtbackend/Terminal.h +++ b/src/vtbackend/Terminal.h @@ -978,7 +978,8 @@ class Terminal bool allowPassMouseEventToApp(Modifiers currentlyPressedModifier) const noexcept { return _inputGenerator.mouseProtocol().has_value() && allowInput() - && !allowBypassAppMouseGrabViaModifier(currentlyPressedModifier); + && !allowBypassAppMouseGrabViaModifier(currentlyPressedModifier) + && _inputHandler.mode() == ViMode::Insert; } template diff --git a/src/vtbackend/ViInputHandler.cpp b/src/vtbackend/ViInputHandler.cpp index e19b279387..db0d85f018 100644 --- a/src/vtbackend/ViInputHandler.cpp +++ b/src/vtbackend/ViInputHandler.cpp @@ -344,7 +344,7 @@ Handled ViInputHandler::sendKeyPressEvent(Key key, Modifiers modifiers) case ViMode::Insert: return Handled{false}; case ViMode::Normal: - break; + return Handled{true}; case ViMode::Visual: case ViMode::VisualLine: case ViMode::VisualBlock: diff --git a/src/vtrasterizer/TextRenderer.cpp b/src/vtrasterizer/TextRenderer.cpp index 3fdf47bd0d..51a562e4a0 100644 --- a/src/vtrasterizer/TextRenderer.cpp +++ b/src/vtrasterizer/TextRenderer.cpp @@ -582,7 +582,6 @@ void TextRenderer::renderTextGroup(std::u32string_view codepoints, text::shape_result const& glyphPositions = getOrCreateCachedGlyphPositions(hash, codepoints, clusters, style); crispy::point pen = _gridMetrics.mapBottomLeft(initialPenPosition); - auto const advanceX = unbox(_gridMetrics.cellSize.width); for (auto const& glyphPosition: glyphPositions) { @@ -590,7 +589,7 @@ void TextRenderer::renderTextGroup(std::u32string_view codepoints, { auto const pen1 = applyGlyphPositionToPen(pen, *attributes, glyphPosition); renderRasterizedGlyph(pen1, color, *attributes); - pen.x += static_cast(advanceX); + pen.x += unbox(_gridMetrics.cellSize.width); continue; } @@ -617,10 +616,14 @@ void TextRenderer::renderTextGroup(std::u32string_view codepoints, if (glyphPosition.advance.x) { + + auto numberOfCellsToAdvance = + std::rint(glyphPosition.advance.x / unbox(_gridMetrics.cellSize.width)); // Only advance horizontally, as we're (guess what) a terminal. :-) // Only advance in fixed-width steps. - // Only advance iff there harfbuzz told us to. - pen.x += static_cast(advanceX); + // Only advance if there harfbuzz told us to. + pen.x += + static_cast(numberOfCellsToAdvance * (unbox(_gridMetrics.cellSize.width))); } } }