Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java Windows Linux Shell
Hello,
 
I've encountered the following problem with jLine. We open the command prompt (both linux and windows) and enter a stream of letters until it "spills" over to the next line. for example:
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aa
 
We then try to delete the entered text, however the cursor will not go back up to the first line and it will remain on the start of the second line. This is a visual issue and not a logic one, since by printing out debug message and by pressing "enter" i can see that the buffer contains the string after all the deletions.
 
If anyone can help me figure out why this happens and how this can be resolved, it would be greatly appreciated.
 
Thanks,
Jonathan
Posted 11-Jun-12 4:00am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I recently had this same problem with a customer who tried to use such a non-break-gabbish to void the print layout.
 
This is a non valid situation.
The explained situation only happens when there are no breaks/spaces in the line.
 
But that does not happen in real life, there is no word that is so long.
 
longest Words @ wikipedia[^]

 
EDIT:

 
This is a common bug in the JLine Project:
Bug Report at projects Bug Tracker[^]
  Permalink  
v3
Comments
TorstenH. at 12-Jun-12 4:39am
   
Thanks for your reply, I was only using aaaa..... as an example. The real problematic input is more along the lines of:

foo> refresh -f "C:\Program Files (x86)\Windows Security Manager\wsecmgr.exe";"C:\Program Files (x86)\Windows Security Manager\wsecmgr1.exe"
 


as you can see there are plenty of breaks in the lines, however the issue still presists
TorstenH. at 12-Jun-12 4:41am
   
See my edit on the answer.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Thanks for the answer! I have no idea how I missed that one. BTW The issue is solved in jline 2.7 by my experience
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 150
2 Richard MacCutchan 135
3 PIEBALDconsult 110
4 Sergey Alexandrovich Kryukov 104
0 OriginalGriff 6,055
1 DamithSL 4,621
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,500
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 12 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100