Comments (3)
Cannot reproduce anymore, closing this issue.
from rio.
It seems to be caused by rendering tab character \t
. It can be fixed with replacing \t
to single space
.
I tried fixing it in create_sugar()
, And it seems to work.
Sugar {
content: if square.c == '\t' { ' ' } else { square.c },
foreground_color,
background_color,
style,
decoration: None,
}
There are problems...
- I don't know why it breaks when rendering
\t
... - If this issue will be fixed by replacing, I don't know where in the code this should be corrected.
from rio.
Good finding @niuez ,
Yes now it make sense why it is failing, looked even how alacritty does and they also replace for ' '
https://github.com/alacritty/alacritty/blob/4b92388396c6da783809c7ce511b5cf6be8a0624/alacritty/src/renderer/text/mod.rs#L150C1-L153
fn draw_cell(
&mut self,
mut cell: RenderableCell,
glyph_cache: &mut GlyphCache,
size_info: &SizeInfo,
) {
// Get font key for cell.
let font_key = match cell.flags & Flags::BOLD_ITALIC {
Flags::BOLD_ITALIC => glyph_cache.bold_italic_key,
Flags::ITALIC => glyph_cache.italic_key,
Flags::BOLD => glyph_cache.bold_key,
_ => glyph_cache.font_key,
};
// Ignore hidden cells and render tabs as spaces to prevent font issues.
let hidden = cell.flags.contains(Flags::HIDDEN);
if cell.character == '\t' || hidden {
cell.character = ' ';
}
Would you mind adding a fix for it? You can add this logic in create_sugar
since is our translation to the renderer.
Also would be good add the check flag.contains(Flag::HIDDEN)
(we have same flag logic)
from rio.
Related Issues (20)
- Ability to overwrite / uninstall keybindings HOT 4
- bug: vi mode on Windows HOT 1
- Unexpected basic 16 terminal colors displayed on some apps HOT 7
- Application does not respond on Wayland HOT 1
- BottomTab does not update on windows when switching tab and exit immediately HOT 1
- Glyphs have very weird rendering HOT 2
- Layout support HOT 1
- Linux Wayland: WA migration
- Linux X11: Wa migration
- Windows: WA migration
- Fix cached run on lines that crashes few times [sugarloaf] HOT 1
- Load emoji and falllback fonts on demand and drop memory after not being used anymore leaving only the file path as reference
- Are ligatures actually supported in 0.0.36? HOT 3
- newline issue when pasting multi-line text
- [Bug] Noticeable text update HOT 1
- [Bug] Noticeable text update
- [Bug] Tab indicator doesn't disappear HOT 2
- [Bug] The `[colors]` option does not override theme colors. HOT 3
- zsh with glyphs won't render HOT 2
- Changing zellij pane with <alt> + arrow does not work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rio.