bugGNU Octave - Bugs: bug #39785, C-v paste behavior different in...

 
 

bug #39785: C-v paste behavior different in Unix and Windows GUI terminal windows

Submitted by:  John W. Eaton <jwe>
Submitted on:  Wed 14 Aug 2013 04:50:33 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: jweOpen/Closed: Closed
Release: devOperating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 18 Aug 2013 10:21:20 PM UTC, comment #17:

Looks good to me, thanks.

Mike Miller <mtmiller>
Project Administrator
Sun 18 Aug 2013 05:40:29 PM UTC, comment #16:

How about this then? (patch attached)

(file #28869)

John Donoghue <lostbard>
Project Member
Sun 18 Aug 2013 12:59:06 PM UTC, comment #15:

I was just about to say no. Can we also get a fix to clear the selection on the Unix terminal when new text is typed for consistency? But not when typing keys that don't insert text, such as Shift+PgUp or Shift+PgDown.

Mike Miller <mtmiller>
Project Administrator
Sun 18 Aug 2013 08:11:56 AM UTC, comment #14:

For me it now also works the same on Linux. So can this bug be closed?

Philip Nienhuis <philipnienhuis>
Project Member
Fri 16 Aug 2013 10:00:54 PM UTC, comment #13:

Found the bug report (#39259); I'll close that one.
(It now works OK on WinXP, too.)

Philip Nienhuis <philipnienhuis>
Project Member
Fri 16 Aug 2013 09:18:30 PM UTC, comment #12:

@John D (comment #7 & #11):

Yep Ctrl-C and Ctlrl-V now work beautifully in the GUI terminal for copy & paste, thanks. Good work!
In addition, Ctrl-C now interrupts long scripts (in the GUI).

Nice collateral effects:

- The "quote doubling" has disappeared at last (single or double quotes were always repeated once and the cursor put behind the extra quote)

- The GUI terminal is now effective from start. Previously I had to click in another pane and then in the terminal to get a cursor and some response there.
I may have filed a bug report for that but I can't find it (hmmm my memory may be hazy).

Philip Nienhuis <philipnienhuis>
Project Member
Fri 16 Aug 2013 12:27:50 PM UTC, comment #11:

Changeset http://hg.savannah.gnu.org/hgweb/octave/rev/0b2a0acd0315 should have fixed the ctrl C/V issue (13 Aug)

John Donoghue <lostbard>
Project Member
Fri 16 Aug 2013 11:23:47 AM UTC, comment #10:

@John D, comment #7:

No C-v and C-c don't work here in Octave f Windows, should they?
My latest (MXE) Windows build is from Aug 12 (IIRC), made with MXE-0.03 (I still get stuck with dllwrap errors/OpenBLAS in later MXE).
Tonight I'll try C-v/C-c with an up-to-date build.

Philip Nienhuis <philipnienhuis>
Project Member
Fri 16 Aug 2013 10:19:07 AM UTC, comment #9:

Clear selection pushed as http://hg.savannah.gnu.org/hgweb/octave/rev/12e5fa85f1bb

John Donoghue <lostbard>
Project Member
Thu 15 Aug 2013 11:42:19 PM UTC, comment #8:

Patch to clear terminal selection on pressing a key/pasting.

(file #28859)

John Donoghue <lostbard>
Project Member
Thu 15 Aug 2013 11:01:31 PM UTC, comment #7:

Phillip, in regards to https://savannah.gnu.org/bugs/?39785#comment3

Ctrl-C and V are not working for copy paste for you?

John Donoghue <lostbard>
Project Member
Thu 15 Aug 2013 06:09:34 PM UTC, comment #6:

Thanks for checking again. Now that I think about it, I do seem to remember that Matlab will actually put a cursor in the console area if you click instead of select, as if it were a text area widget, as if you could actually type there. Once you start typing the cursor jumps back to the prompt line. Is that still the case?

You're right about GUIs on Linux, too, I was thinking about terminals (xterm, gnome-terminal, etc) where you can select with the mouse, the cursor remains at the prompt, and you can still input text while keeping previous text selected.

So the right behavior for both platforms should be to clear the selection on any input, whether it's a paste or keyboard input?

Mike Miller <mtmiller>
Project Administrator
Thu 15 Aug 2013 05:00:40 PM UTC, comment #5:

In that case ML wipes the selected text. In fact any key press, or left mouse button click, will do that (incl. Ctrl-v)

I think this behavior is valid for the majority of Windows GUI programs (and -as far as my experience goes- many Linux GUI programs too these days)

Philip Nienhuis <philipnienhuis>
Project Member
Thu 15 Aug 2013 12:35:42 PM UTC, comment #4:

Thanks for checking in Matlab. What does Matlab do with the selection when typing new text at the prompt while text is selected elsewhere in the console area?

Mike Miller <mtmiller>
Project Administrator
Thu 15 Aug 2013 12:15:08 PM UTC, comment #3:

Just had a chance to check in Matlab:

Normally in most Windows progs C-v would replace selected text by the text in the clipboard (or other clipboard contents if appropriate).

In the Matlab terminal however, C-v pastes clipboard text at the prompt AND clears selection of text elsewhere in the terminal.
I suppose that is what Matlab users would expect for C-v.

As regards Octave on Windows (GUI mode), C-v, C-x and C-c still don't work (copying to / pasting from the clipboard currently works via a right-click popup menu). So it isn't unexpected that in the Octave terminal this still doesn't work.

In octave-cli.exe (in fact, a cmd32.exe window) the key bindings differ from other Windows GUI programs (<Enter>-key = copy selection, right-click = paste). C-v does clear a text selection, but in fact any key press will do that.

Is this the information you needed?

Philip Nienhuis <philipnienhuis>
Project Member
Thu 15 Aug 2013 03:38:35 AM UTC, comment #2:

I haven't run the GUI on Windows in a while, but I do see the reported behavior on Linux.

My expectation is that the selection should remain highlighted until the mouse is clicked somewhere in the terminal area. Typing in the terminal area leaves the selection highlighted.

Possibly related: Highlight some text, then press Enter until the text scrolls to the top of the terminal area. It will un-highlight when the text reaches the top line of the terminal.

Mike Miller <mtmiller>
Project Administrator
Wed 14 Aug 2013 08:51:38 PM UTC, comment #1:

In almost all Windows programs, incl. Matlab, Ctrl-v = paste clipboard contents. That's what it does in the ML terminal too.

IIRC you once mentioned that Ctrl, Alt and Shift key combinations had better be configurable?

Philip Nienhuis <philipnienhuis>
Project Member
Wed 14 Aug 2013 04:50:33 PM UTC, original submission:

In the Unix terminal window, C-v will clear the selection while in the Windows terminal window it does not. It seems to me that it should do the same in both. What does Matlab do (i.e., what would Matlab users expect)?

John W. Eaton <jwe>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #28869:  unix_clearsel.patch added by lostbard (967B - text/x-patch)
file #28859:  clear_sel.patch added by lostbard (962B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by jwe (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 18 Aug 2013 05:40:29 PM UTClostbardAttached File-=>Added unix_clearsel.patch, #28869
    Sun 18 Aug 2013 12:40:29 PM UTClostbardStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Thu 15 Aug 2013 11:42:19 PM UTClostbardAttached File-=>Added clear_sel.patch, #28859
    Thu 15 Aug 2013 03:38:35 AM UTCmtmillerStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1