Giter Club home page Giter Club logo

Comments (2)

glacambre avatar glacambre commented on July 4, 2024

The following patch fixes it:

diff --git a/src/NeovimFrame.html b/src/NeovimFrame.html
index 996b9a7..3f85697 100644
--- a/src/NeovimFrame.html
+++ b/src/NeovimFrame.html
@@ -27,6 +27,7 @@
                 width: 1ch;
             }
         </style>
+        <style id="nvim_row_height"></style>
         <style id="nvim_highlight_style"></style>
         <style id="nvim_cursor_style"></style>
         <script type="application/javascript" src="nvimui.js"></script>
diff --git a/src/NeovimFrame.ts b/src/NeovimFrame.ts
index 1f471b3..a52780b 100644
--- a/src/NeovimFrame.ts
+++ b/src/NeovimFrame.ts
@@ -61,10 +61,16 @@ window.addEventListener("load", async () => {
         ext_linegrid: true,
         rgb: true,
     });
+
+    const styleHeight = document.getElementById("nvim_row_height");
     window.addEventListener("resize", _ => {
         keyHandler.style.left = `0px`;
         keyHandler.style.top = `0px`;
         const [nCols, nRows] = getGridSize(host);
+        styleHeight.innerText = `.nvim_cell, .nvim_row {
+            height: ${Math.floor(window.innerHeight / nRows)}px;
+            overflow: hidden;
+        }`;
         nvim.ui_try_resize(nCols, nRows);
     });

But it actually might be better to avoid cropping characters. Things look slightly ugly but they're readable, which is probably what's most important.

from firenvim.

glacambre avatar glacambre commented on July 4, 2024

Rendering isn't broken anymore so this was probably a font issue.

from firenvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.