Click here to Skip to main content
12,757,627 members (37,128 online)
Rate this:
Please Sign up or sign in to vote.
See more: Java Windows Linux Shell

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:


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.

Posted 11-Jun-12 4:00am
Rate this: bad
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[^]


This is a common bug in the JLine Project:
Bug Report at projects Bug Tracker[^]
TorstenH. 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. 12-Jun-12 4:41am
See my edit on the answer.
Rate this: bad
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

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 12 Jun 2012
Copyright © CodeProject, 1999-2017
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