-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some characters break rendering #12
Comments
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. |
Rendering isn't broken anymore so this was probably a font issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The characters in this string get really tall rows. This can probably be fixed with a bit of CSS.
The text was updated successfully, but these errors were encountered: