aptana/Pydev — pull request #39 by jamesblackburn (2012-06-26 17:56:14+00:00)
Title: Console cursor shouldn't need to be next to the '>>>' for console entry to work 

Whitespace characters, such as newline, entered should be sent to the end of the console.

It's a bit odd that the logic for console cursor fixing up is spread about in so many places. There's:
- ScriptConsoleViewer#KeyChecker (here)
- ScriptConsoleSytledText#changeSelectionToEditableRange
- ScriptConsoleDocumentListener#processAdditions

The first is used on key-press, the second during cut / drop / paste, the last happens before the console changes. I wonder if there's a way to better unify this logic...

More worryingly, I can get instances where getCommandLineLength() is negative (this happens if you disable the cursor move in ScriptConsoleViewer#KeyChecker and press enter). Weird.