cursor starts at end of line in side-by-side diff?

62 views
Skip to first unread message

Martin Waitz

unread,
May 7, 2015, 5:12:06 PM5/7/15
to repo-d...@googlegroups.com
Hi,

is there a reason why the cursor always starts at the end of the first difference when opening the side-by-side diff? (Gerrit 2.11)
It's not even possible to position the cursor there afterwards and it is confusing some users (Why does Gerrit show this added underscore at the end?)

I looked through client/diff/SideBySide.java and related files but could not find where the cursor is positioned.
Just putting it in the first column would already help, I think.

Is there also a possibility to use a different color for the cursor?
Or maybe using a vertical cursor most people are used to?

Thanks for your help! :-)

-- Martin

Martin Waitz

unread,
May 13, 2015, 5:44:24 AM5/13/15
to repo-d...@googlegroups.com
anybody?

I'd really like to change the appearance and location of the cursor.

Using underscore is not very vim-style and confusing.
Maybe we can use a full-block cursor with some nice color (e.g. reusing the color used for the active line).

End of first diff line is really problematic:
when the file contains long lines, then the diff view might start scrolled to the right which is very confusing.

-- Martin

Saša Živkov

unread,
May 13, 2015, 6:50:47 AM5/13/15
to Martin Waitz, repo-d...@googlegroups.com
On Wed, May 13, 2015 at 11:44 AM, Martin Waitz <martin...@gmail.com> wrote:
anybody?

I'd really like to change the appearance and location of the cursor.

Using underscore is not very vim-style and confusing.
+1
 
Maybe we can use a full-block cursor with some nice color (e.g. reusing the color used for the active line).
+1 


End of first diff line is really problematic:
when the file contains long lines, then the diff view might start scrolled to the right which is very confusing.

I agree.

When you are on that topic, could you also check why the key-repeat doesn't work (for example: press and keep j or k).


-- Martin

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Ostrovsky

unread,
May 19, 2015, 2:35:42 AM5/19/15
to repo-d...@googlegroups.com

Am Donnerstag, 7. Mai 2015 23:12:06 UTC+2 schrieb Martin Waitz:
Hi,

is there a reason why the cursor always starts at the end of the first difference when opening the side-by-side diff? (Gerrit 2.11)
It's not even possible to position the cursor there afterwards and it is confusing some users (Why does Gerrit show this added underscore at the end?)

I looked through client/diff/SideBySide.java and related files but could not find where the cursor is positioned.
Just putting it in the first column would already help, I think.

 

Is there also a possibility to use a different color for the cursor?
Or maybe using a vertical cursor most people are used to?



However, as explained in the commit message in change 67950, we should really
make these and other parts of the UI configurable. We are just not there yet. First
step would be to migrate the persistence backend from database to git, then we
should convert prettify based unified screen to Codemirror, and then we should be
ready to add more configuration options to all three screens:

* inline editor
* side by side
* unified

You may also be interested in my series for migration of user preferences persistence
to All-Users git repository: [1] and implementing user preferences in inline edit series
and adding new configuration options, like key maps (Emacs & Vim), cursor blink rate
and much more (compared to diff preferences) to inline editor preferences box: [2].
Here is the screen shot: [3].



Martin Waitz

unread,
May 19, 2015, 3:42:05 AM5/19/15
to repo-d...@googlegroups.com
Great!
could these changes also go into 2.11.1?

David Pursehouse

unread,
May 19, 2015, 4:13:00 AM5/19/15
to repo-d...@googlegroups.com
On 05/19/2015 04:42 PM, Martin Waitz wrote:
> Great!
> could these changes also go into 2.11.1?
>

Yes, if somebody backports them onto stable-2.11 and verifies them.

I'm planning to release 2.11.1 later this week.

Saša Živkov

unread,
May 19, 2015, 4:43:50 AM5/19/15
to David Pursehouse, repo-d...@googlegroups.com
On Tue, May 19, 2015 at 10:12 AM, David Pursehouse <david.pu...@sonymobile.com> wrote:
On 05/19/2015 04:42 PM, Martin Waitz wrote:
Great!
could these changes also go into 2.11.1?


Yes, if somebody backports them onto stable-2.11 and verifies them.


I'm planning to release 2.11.1 later this week.

Martin Waitz

unread,
May 19, 2015, 5:02:27 AM5/19/15
to repo-d...@googlegroups.com, david.pu...@sonymobile.com
Nice :-) Thanks!

Martin Waitz

unread,
May 20, 2015, 11:45:08 AM5/20/15
to repo-d...@googlegroups.com, david.pu...@sonymobile.com
can we use the same cursor for the inline editor?
I tried adding similar CSS to editor/EditScreen.ui.xml but the cursor still stays at "1px solid black" :-/

Martin Waitz

unread,
May 21, 2015, 9:17:31 AM5/21/15
to repo-d...@googlegroups.com, david.pu...@sonymobile.com
Reply all
Reply to author
Forward
0 new messages