Coolline repeats the last two characters of closing blocks #688

jasonLaster opened this Issue Aug 10, 2012 · 2 comments


None yet

2 participants


When correcting for indentation, the last 2 characters of the closing keyword "end" are repeated. Another weird glitch is that this doesn't happen with Readline.

It looks like the culprit is this line:

output.print @indent.correct_indentation(current_prompt, indented_val, original_val.length - indented_val.length)
[1] pry(main)> def fu                                                                                                                                                             
[1] pry(main)* endnd                                                                                                                                                              
=> nil
[2] pry(main)> loop do                                                                                                                                                            
[2] pry(main)* endnd 
[1] pry(main)> loop do                                                                                                                                                            
[1] pry(main)*   loop do                                                                                                                                                          
[1] pry(main)*   endnd                                                                                                                                                            
[1] pry(main)* endnd  
pry member

With Pry.color = false I get odd results too:

[1] pry(main)> Pry.color = false                                                                                                                               
[2] pry(main)> def geronimo 
[2] pry(main)* end                                                                                                                                             
  ] pry(main)*   end                                                                                                                                           
=> nil
[3] pry(main)>  
[4] pry(main)> class Banzai       
[4] pry(main)*   def huzzah                  
[4] pry(main)*     puts "Huzzah!"      
[4] pry(main)*   end                                                                                                                                           
[4] pry(main)* end                                                                                                                                             
  ] pry(main)*   end                                                                                                                                           
=> nil
[5] pry(main)>
pry member


@kyrylo kyrylo closed this Aug 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment