Community
Participate
Working Groups
The cursor is currently positioned at the beginning of a line after Page-Up. Since it is usually the intent just to re-execute, an Enter corrupts the display. Put cursor at End-Of-Line.
Created attachment 190463 [details] cursor to EOL and initial selection fix A retrofit fix from the Xtext console a) PageUp/Down now positions at end of line b) On start up the selectionService fails to provide the prevailing selection, so it now searches for a selection in the active editor. b) is better but perhaps not entirely right; watching the status bar feedback, the problem is perhaps that console creation trashes the selection, so while the fix ensures that selection is available for the first expreession, the status bar remains blank till a new selection is made.
Hi Ed, I've looked at the patch. Debugging through the code I see that the change should work. I recommend factoring the common pieces String newText = history.get(currentHistoryPointer); document.set(newText); input.setSelectedRange(newText.length(), 0); into a method that you call from the three locations where this code stretch occurs. I've never actively been using the OCL console, and if, I was confused by its usability. The patch is certainly helpful. At the same time, depending on what we decide the future of the console should be, we really should revise it from a usability point of view. Why doesn't it show the entered text in the input field and lets the user navigate around with regular cursor keys, including cursor up/down/left/right? It doesn't seem intuitive to me that I have to press PageUp to get the the last expression where every other console would just use Up for this. +1 for this with the recommendation to factor as described above, and I'll open another bug regarding my general usability concerns regarding the console.
setTextFromHistory() introduced. Committed to HEAD for M6.
Closing