Comments (2)
The screenshot has some wierd parts.
Line 6 and 9 is showing that a
is realy "€aaa"
. If so, IRB(not Reline) will just print "=> \e[31m\e[1m\"\e[0m\e[31m€aaa\e[0m\e[31m\e[1m\"\e[0m\n"
to stdout in line 4. It does not depend on OS, terminal emulator, terminal size or other environment.
IRB::ColorPrinter.pp a="€aaa", output='', width=rand(100)
# => "\e[31m\e[1m\"\e[0m\e[31m€aaa\e[0m\e[31m\e[1m\"\e[0m\n"
# ColorPrinter does not use Reline::Unicode to calculate width.
But it actually showed "€aa"
.
If this is reline's bug, broken rendering or wrong cursor position should only appear in line 2, not on line 4.
This behavior indicates that character widths in windows is not font-dependent but color-dependent. It should be a text rendering bug of windows console.
from reline.
@tompng Thank you for verifying this issue!
I just retried the above inputs with the "NSimSun" font on RubyInstaller-3.2.0 and now it works! The "€" has the double size as other characters, but all following characters are properly printed and are not overwritten. Also cursor movements and inserts work correctly.
So either the newer ruby version has fixed this in some way, or a Windows update did it.
from reline.
Related Issues (20)
- I just compiled ruby 3.3.0 and reline has a problem HOT 8
- Completion dialog disappears while moving completion list to candidates that ends with `=`
- Inputrc mode conditions not handled
- Reline crash with `C-v` `C-k` and any alphabet
- Continue implement bracketed paste mode HOT 1
- Wrong inputrc loading order HOT 1
- newline not honored in Reline.readline("\nMy Prompt: ") HOT 1
- Support multiline input in nomultiline mode `Reline.readline`
- When used inside Emacs with Reline, input is echoed HOT 3
- Cursor offset with show-mode-in-prompt string HOT 2
- Don't enable test mode by TERM=dumb HOT 3
- reline/line_editor.rb:367:in `==': stack level too deep (SystemStackError) HOT 6
- no implicit conversion of Array into Integer (TypeError) HOT 4
- Add a timeout to `cursor_pos` and warn if terminal does not respond to cursor position query HOT 2
- Upward navigation through completion results not working as expected HOT 4
- Text echoes after using backtick on Windows 11 command prompt/powershell HOT 4
- Some operations throwing the exception reline/ansi.rb:246:in `winsize': Operation not supported by device - <STDIN> (Errno::ENODEV) HOT 2
- `editing-mode` rewinds after input confirmation
- Reline does not support convert-meta HOT 1
- Crash when Kernel#loop is redefined HOT 4
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 reline.