Comments (5)
I only had a short browse around the code base. What makes me a bit suspicious is this It's just for ligaturesdouble_width
. Could it be that neovim-gtk does not support triple-width, 4-byte characters? But it's only a guess since I didn't review it in detail
#[derive(Clone)]
pub struct Cell {
pub hl: Rc<Highlight>,
pub ch: String,
pub dirty: bool,
pub double_width: bool,
}
impl Cell {
pub fn new_empty() -> Cell {
Cell {
hl: Rc::new(Highlight::new()),
ch: String::new(),
dirty: true,
double_width: false,
}
}
pub fn clear(&mut self, hl: Rc<Highlight>) {
self.ch.clear();
self.hl = hl;
self.dirty = true;
self.double_width = false;
}
}
one usage
for (cell_idx, cell) in line.line.iter().enumerate() {
if cell.double_width {
continue;
}
if !cell.ch.is_empty() {
line_str.push_str(&cell.ch);
} else {
line_str.push(' ');
}
let len = line_str.len() - byte_offset;
for _ in 0..len {
cell_to_byte.push(cell_idx);
}
let next = style_attr.next(byte_offset, byte_offset + len, cell, hl);
if let Some(next) = next {
style_attr.insert_into(&attr_list);
style_attr = next;
}
byte_offset += len;
}
Could also be that those are double_with ligatures to be drawn. neovim-gtk has at least two character ligatures as ->
. Should take a more detailed look.
let len = line_str.len() - byte_offset;
But I suppose it has to be a byte != str.len issue.
from neovim-gtk.
I'm willing to bet #254 is related to this as well. I haven't dug into it yet, but I hope to soon (maybe not until hacktoberfest, though).
from neovim-gtk.
Hi @jacobmischka, have you had any chance to look into this?
I can help if needed (by running test, debugging, etc).
from neovim-gtk.
I haven't, sorry.
from neovim-gtk.
After system upgrade the issue is fixed for me
cairo 1.17.4-3
glib2 2.66.4-2
gtk3 1:3.24.24-2
pango 1:1.48.1-1
from neovim-gtk.
Related Issues (20)
- argc() not work in vimrc
- Add support to strikethrough text
- Underlines and undercurls are not rendered correctly
- Floating point issues cause gaps in background occasionally
- Characters aren't being drawn sometimes HOT 4
- Chinese font width error
- Could not initialize nvim
- Character rendering broken with varying word lengths combined with wrapping HOT 7
- update wiki to include cursor blinking as an option HOT 1
- guisp ignored for underline
- Exits successfully with :cq
- Helping out with maintanence? HOT 10
- Artifact for Windows not Found HOT 1
- Improvement: Popup menu go below current line
- Impossible to install neovim-gtk on Ubuntu 22.04 (dependency problem with package 'fragile') HOT 2
- NGShowProjectView doesnโt do anything when NVIM_GTK_NO_HEADERBAR=1 HOT 1
- Feature request: open multiple tabs with -p
- Crash when trying to middle-click-paste if clipboard is empty
- Please create a way to send monetary contribution
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 neovim-gtk.