Comments (10)
I am not currently using fbpad, but I tested it there some time and same thing happens.
from neatvi.
Okay yes I know kinda understand what the problem is, the last visible character is combining, simply omitting the last character solves the problem, so actually this is a bug where vi tries to render a few bytes more than there is on the screen. I think Nextvi will have this bug fixed soon, working on it now that I actually found the cause.
from neatvi.
Ok, why is the combining character implemented like that? ren_placeholder() is bugged and will return more characters than needed into term_commit() resulting in this incorrect string rendering.
Take a look at my commit 8f788fede224a1e60d0abf7eabf2565b74f0d679
with a proposed fix, it works just fine. When we try to render the last possible comb character we must return only
1 byte, so that there is no excess spill.
from neatvi.
Ok well, it fixed the problem on one terminal but still does not work in tty, it seems like the terminal decides to render the combining characters however the hell it wants? Like in tty it thinks that the special character hexed 0640 is the width of 2 chars? As a result it completely throws off the result and cursor position mismatches the actual character.
from neatvi.
Ok, I think it makes sense better now. It's like that because tty does not actually even try to combine the characters, so it's valid that it ends up being 2 chars. Nonetheless this is still utterly wrong. Is there a way to figure out if terminal can combine the chars?
from neatvi.
I've just checked fbpad again and it works correctly without a patch there. That just tells me that st terminal simply does not render combining chars correctly if it gets a combining char on the boundary, ie the last visible col. The patch worked because nextvi did essentially what the terminal should of done.
What should I do Ali? Report it to Hiltjo in hopes it gets fixed in the terminal or keep the patch in vi?
from neatvi.
I think we can make an ex option to disable the dialectical mark, so that users from tty don't get all the junk extra characters, or even just test using istty and set the variable automatically?
from neatvi.
from neatvi.
from neatvi.
from neatvi.
Related Issues (20)
- @ key HOT 2
- deletion of newline with dw HOT 3
- undo with %s// replacement jump HOT 4
- ren_placeholder to find character width is wrong HOT 13
- Help with negated char in posix regex HOT 5
- I made your regex 2X faster. HOT 6
- clang warnings HOT 2
- lbuf_pair() is bugged with utf-8 and some other pair character HOT 2
- ^y ^e keys cursor pos mismatch HOT 9
- re_groupcount() is bugged (counting nonsense brackets). HOT 14
- lbuf_replace is utterly slow HOT 8
- ex_line() should be able to escape "|" character HOT 19
- cmd_pipe() is bugged (invalid descriptor -1) HOT 2
- "cw" and last word of line HOT 2
- neatvi & less HOT 1
- Pasting into macOS terminal HOT 2
- rstr is bugged (^$ enclosed match) HOT 2
- macOS fails right now HOT 1
- cant backspace existing characters. how do i fix? HOT 1
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 neatvi.