Community
Participate
Working Groups
STR: 1. Open a file in Orion with several lines. 2. Go to one of the middle lines, in the middle of the said line. 3. Press Ctrl-Up/Down several times. 4. Press any arrow key now, without holding Ctrl. Notice that when Ctrl-Up/Down is used the line highlight goes away. When you start doing other caret navigation operations (with the arrow keys), the old caret location is used as the start point (same as in point 2). It looks like the native caret moves, but not that of Orion, hence the breakage. Should be easy to fix. Please note this is for Linux users only. On Windows Ctrl-Up/Down does nothing (as expected). Someone with a Mac should check the expected behavior.
Just found that this bug is somewhat related to bug 347348. That is, I assume, for Windows users. This bug is for Linux users, so there shouldn't be a conflict between the two reports.
Proposed fix: https://github.com/mihaisucan/orion.client/tree/bug-362107 Additional comment: in doLineUp/Down there's a check that resets the X column if x == -1 || args.select and now I added args.wholeLine. Still, I believe we should remove args.select. When the user is selecting the X column caret location is never remembered, it's always updated. Compared to other editors (gedit on Linux) this behavior is different. Gedit maintains the X column caret location even during selection. Any thoughts on this? (I haven't tested on other systems...)
I think we should test this on firefox/chrome on linux and mac, and firefox/chrome/ie on windows before removing the code. On Windows, IE will reset columnX during selection (tested on notepad/wordpad/ie textarea), Firefox does not reset the columnX (tested on Firefox textarea). I will try to test all the cases after lunch. (signed Felipe, using Silenio's machine. https://bugs.eclipse.org/bugs/show_bug.cgi?id=362428#c2 it was also me, sorry for the confusion).
I tested on all the places, basically: The columnX is only reset on IE. Ctrl-Up/Down - is only implemented for Firefox on Linux, and on my machine (fedora 14, firefox 7.0.1) it is the same regular up/down (not resetting columnX).
Hello Felipe! (In reply to comment #4) > I tested on all the places, basically: > > The columnX is only reset on IE. Ok, so this means Orion shouldn't reset columnX in all cases except IE. Do you want to special-case IE? That's fine by me. I think columnX during selection should not be reset. > Ctrl-Up/Down - is only implemented for Firefox on Linux, and on my machine > (fedora 14, firefox 7.0.1) it is the same regular up/down (not resetting > columnX). Yep, only Firefox on Linux. But editors on Linux also have Ctrl-Up/Down. I am not sure what would be most-wanted in Orion? Compat with Firefox or with editors on Linux? I picked compat with editors, since Orion is an editor. Either way, it's fine for me, as long as the Ctrl-Up/Down breakage is fixed in Firefox on Linux. Thank you for your testing and for checking the patch. Much appreciated!
fixed http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6eeb751f99b59063a9d948bc8eeba5be896c3423 changes: - reset columnX during selection only for IE - fix ctrl+up/down for firefox on linux - added more key bindings for mac: opt+up/down - linestart/lineend (broken on safari and chrome) opt+shift+up/down - select linestart/lineend (broken on safari and chrome) ctrl+left/right - linestart/lineend (broken on safari and chrome) ctrl+shift+left/right - select linestart/lineend (broken on safari and chrome) ctrl+up/down - scroll page up/down
Felipe: thanks for your patch that fixes this bug and brings more keybindings for Mac users.
(In reply to comment #6) > fixed > http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6eeb751f99b59063a9d948bc8eeba5be896c3423 There's a regression caused by this patch. Found this with the Firefox automated test for bug 360726. Ctrl-Shift-Down no longer works as it was supposed to: columnX is not always reset and wholeLine has no effect after several presses. This means that most of the times selection is not extended until the end of the line. Fix pushed: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=0a39919753d45bf9b41a1a326bbcf756ad976244 (I hope this is fine!)
Ops Thank you for the fix