Comments (6)
The bug seems to be introduced around line 7214. On first invocation, search_string is full of "\000"s, so appending "': " to that causes the string length to be incorrect when execution reaches _rl_col_width.
I'm looking to start patching things up but, at least for the reverse-search, this seems to be a pretty deep rabbit hole...
from rb-readline.
Hello, This has been partially fixed by Spakman's commits, however under 1.9.2 does some weird things.
We should investigate it further.
from rb-readline.
I can confirm the bug for:
C:>ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
C:>irb
(reverse-i-search) C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:4894:in
rl_replace_line': undefined method delete' for nil:NilClass (NoMethodError) from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:4149:in
_rl_isearch_dispatch'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:7044:in rl_search_history' from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:7015:in
rl_reverse_search_history'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:4232:in send' from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:4232:in
_rl_dispatch_subseq'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:4221:in _rl_dispatch' from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:4631:in
readline_internal_charloop'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:4705:in readline_internal' from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:4727:in
readline'
from C:/Ruby187/lib/ruby/site_ruby/1.8/readline.rb:40:in readline' from C:/Ruby187/lib/ruby/1.8/irb/input-method.rb:97:in
gets'
from C:/Ruby187/lib/ruby/1.8/irb.rb:140:in eval_input' from C:/Ruby187/lib/ruby/1.8/irb.rb:271:in
signal_status'
from C:/Ruby187/lib/ruby/1.8/irb.rb:139:in eval_input' from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:189:in
call'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:189:in buf_input' from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:104:in
getc'
from C:/Ruby187/lib/ruby/1.8/irb/slex.rb:206:in match_io' from C:/Ruby187/lib/ruby/1.8/irb/slex.rb:76:in
match'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:287:in token' from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:263:in
lex'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:234:in each_top_level_statement' from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:230:in
loop'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:230:in each_top_level_statement' from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:229:in
catch'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:229:in each_top_level_statement' from C:/Ruby187/lib/ruby/1.8/irb.rb:154:in
eval_input'
from C:/Ruby187/lib/ruby/1.8/irb.rb:71:in start' from C:/Ruby187/lib/ruby/1.8/irb.rb:70:in
catch'
from C:/Ruby187/lib/ruby/1.8/irb.rb:70:in `start'
from C:/Ruby187/bin/irb:13
C:>
from rb-readline.
Did you test the code in master?:
ruby -Ilib -S irb
from rb-readline.
I did not, my bad. Can confirm that the bug is fixed with rb-readline-0.2.2 and ruby 1.8.7. Sorry for the interruption, I'll go back into my cave now :)
from rb-readline.
Thank you. Closing this now.
from rb-readline.
Related Issues (20)
- IRB and readline with non english keyboards on Windows HOT 1
- Alt+. crashes in `_extract_last_quote` when last line is empty
- Already initialized constant warnings under Ruby 2.3.1 HOT 4
- new release HOT 4
- VI in Rails Console HOT 2
- rb-readline (0.5.3) crashes on mac_os_x / 2.3.1p112 HOT 1
- "\r" being displayed after hitting enter in rb-readline on Arch HOT 2
- Invalid byte sequence in UTF-8 when running console HOT 5
- issue deploying rails 5 application to AWS using Elastic Beanstalk due to rb-readline HOT 5
- RbReadline.rl_insert_text can not insert Chinese characters
- Officially support JRuby HOT 2
- ArgumentError when case insensitive matching is active HOT 1
- Add support for Readline.vi_editing_mode? & Readline.emacs_editing_mode? HOT 1
- Tests are randomly failing
- Using rb-readline in Windows with cygwin/mintty/git for Windows doesn't work
- Rb-readline causes the rails console to use the keyboard "↑" after typing Chinese and cannot load Chinese
- Fails when $TERM=xterm HOT 4
- Broken support for special prefixes HOT 1
- `Readline::HISTORY.delete_at(index)` not working for indices of negative values
- Encoding::UndefinedConversionError for UTF-8 to ASCII8
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 rb-readline.