This page is no longer maintained — Please continue to the home page at www.scala-lang.org

JLine in interpreter on windows

2 replies
Naftoli Gugenheim
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
When using the interpreter on XP without -Xnojline once you type past the end of the line you can't get the cursor back on the previous line (even with backspace). If you press Home it thinks it went to the beginning but really its on the same line. When you press End or cursor forward it prints everything it thinks you're going past so if you press Home, End it prints everything over starting from the beginning of the last line.
Also when you want to move the cursor a lot so you hold down the arrow key the cursor is invisible so you don't know when to stop.
With -Xnojline everything works normally.
daniel
Joined: 2008-08-20,
User offline. Last seen 44 weeks 15 hours ago.
Re: JLine in interpreter on windows
This is a restriction of Java's standard input/output streams.  JLine uses native libraries to access platform-specific shell behavior, allowing things like backspace, command history, home, etc.  So, it's not really a bug, it's just a fact of life when working with the JVM.

Daniel

On Tue, Jan 27, 2009 at 11:58 AM, Naftoli Gugenheim <naftoligug@gmail.com> wrote:
When using the interpreter on XP without -Xnojline once you type past the end of the line you can't get the cursor back on the previous line (even with backspace). If you press Home it thinks it went to the beginning but really its on the same line. When you press End or cursor forward it prints everything it thinks you're going past so if you press Home, End it prints everything over starting from the beginning of the last line.
Also when you want to move the cursor a lot so you hold down the arrow key the cursor is invisible so you don't know when to stop.
With -Xnojline everything works normally.

Naftoli Gugenheim
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: JLine in interpreter on windows
I don't understand. If it uses native libraries then why is it restricted? And howcome without JLine these things work without a native library?

On Tue, Jan 27, 2009 at 1:22 PM, Daniel Spiewak <djspiewak@gmail.com> wrote:
This is a restriction of Java's standard input/output streams.  JLine uses native libraries to access platform-specific shell behavior, allowing things like backspace, command history, home, etc.  So, it's not really a bug, it's just a fact of life when working with the JVM.

Daniel

On Tue, Jan 27, 2009 at 11:58 AM, Naftoli Gugenheim <naftoligug@gmail.com> wrote:
When using the interpreter on XP without -Xnojline once you type past the end of the line you can't get the cursor back on the previous line (even with backspace). If you press Home it thinks it went to the beginning but really its on the same line. When you press End or cursor forward it prints everything it thinks you're going past so if you press Home, End it prints everything over starting from the beginning of the last line.
Also when you want to move the cursor a lot so you hold down the arrow key the cursor is invisible so you don't know when to stop.
With -Xnojline everything works normally.


Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland