Page MenuHomePhabricator

Rclick menu (paste etc) don't work outside the numbered lines.
Open, NormalPublic

Description

Open code editor in elm code

rclick on an area of the window outside the numbered lines

no menu

ApB created this task.Mar 13 2018, 9:47 AM

I had thought that would be the correct behaviour... Given that there is no context at that location what do you imagine the menu should contain?

ApB added a comment.Mar 22 2018, 1:41 AM

Paste. And if you click paste it should paste it at the last line.

Where in the last line? The pointer position may not be after the end of the last line...

ApB added a comment.Mar 22 2018, 1:51 AM

The pointer may be wherever. When you paste below the numbered lines the paste should go at the end. And even if you paste (with the mouse obviously) in a different position than where the pointer is -in the numbered lines- the paste should go where you clicked.

When you right click the cursor jumps to the location so that the operation will happen where expected.
If you are outside the area and there is a long line of text on the last line it does not make sense to paste at the end of it - the content will not appear in the expected position.

Should the cursor instead move to the correct X position on the last row, or should it create a new blank line to be pasted into?
I'm not sure that either behaviour is what the user would expect - what do you think?

ajwillia.ms added a comment.EditedMar 22 2018, 4:30 AM

Looking at some editors (on OS X):

TextMate would select the whole last line and replace it
TextEdit will leave the cursor where it is and insert, if it's at the end of the last line, and otherwise select the last line and replace it

It's not a well defined problem I guess, and I'd like to find the path of least surprise...

ApB added a comment.Mar 22 2018, 4:44 AM

What i would expect is: If i click (paste) on an area below the numbered lines i would expect the text to be pasted at the end of the last line. Creating a new line and pasting it would also be ok. Replacing something (unless it is selected) would be a big no. As for moving the cursor if you click outside the number lines i believe it shouldn't move. Ie what if you regret pasting. The paste however should be at the end or at a new line.

bu5hm4n added a project: Restricted Project.Jun 11 2018, 1:16 AM
zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 6:50 AM
zmike edited projects, added efl: widgets; removed Restricted Project.Jun 11 2018, 8:15 AM
ajwillia.ms triaged this task as Normal priority.Jun 19 2018, 6:47 AM

I'm not sure I agree with not moving the cursor but pasting somewhere that the cursor is not...
The cursor remains where the input is occurring and I'd like to maintain that.

I think "create a new line, move the cursor there and then paste" works as a definition for me - does that make sense?

ApB added a comment.Jun 19 2018, 10:15 AM

I'm not sure I agree with not moving the cursor but pasting somewhere that the cursor is not...
The cursor remains where the input is occurring and I'd like to maintain that.

I think "create a new line, move the cursor there and then paste" works as a definition for me - does that make sense?

I thnk i'd be ok with that. :)

@netstar @ajwillia.ms did anything ever happen with this?