Skip to content

Shift+Ins performing Copy instead of Paste #88683

Closed

Description

@pdanpdan

Issue Type: Bug

How to reproduce:

  1. Open new empty document and fill with
123
456
789
  1. Select first row (123) and press Ctrl+Insert
  2. Go on empty row (4) and press Shift+Insert - it will paste 123 (GOOD)
  3. Select second row (456) and press Shift+Insert - it should paste 123 but it does nothing visible except collapsing the selection to the end
  4. Go on empty row (5) and press Shift+Insert - it will paste 456 (in step 4 it performed copy instead of paste)

Using Ctrl+V instead of Shift+Insert works as expected.

Might be related to #73462

VS Code version: Code - Insiders 1.42.0-insider (33c79d5, 2020-01-15T08:55:46.564Z)
OS version: Linux x64 5.3.0-7625-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz (8 x 3595)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off_ok
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 31.21GB (11.79GB free)
Process Argv --no-sandbox --unity-launch
Screen Reader no
VM 0%
Extensions: none

Activity

  1. gjsjohnmurray commented on Jan 15, 2020

    @gjsjohnmurray
    Contributor

    /confirmationPending I followed your instructions but didn't see the problem you reported. Please check your keybindings in case you have Shift+Insert bound to something else as well as to Paste.

    Worth saying I was testing on a different platform (Windows).

  2. gjsjohnmurray commented on Jan 15, 2020

    @gjsjohnmurray
    Contributor

    Hmm, maybe #36170 is significant. The associated PR seems to have landed in today's Insiders.

  3. pdanpdan commented on Jan 15, 2020

    @pdanpdan
    Author

    Yes, you are right, it's that PR. Just that the primary clipboard has always the current selection if you want to replace some existing text.

    I'll re-map the key, but I would let this issue open because I think it is malfunctioning.

  4. added
    linux
    on Jan 19, 2020
  5. alexdima commented on Jan 19, 2020

    @alexdima
    Member

    Popescu Dan (@pdanpdan)
    I think this is just how selection clipboard works normally...

    Every time something is selected, the selection clipboard is set to what is selected. So selecting something and pressing Shift+Insert means that first the selected text is placed in the selection clipboard and then the very same text is pasted on top, effectively causing no change.

    So, in step 4. above, selecting 456 is what causes the selection clipboard to become 456.

    There is a single setting at editor.selectionClipboard which removes support for this, but I believe this is working as expected given the descriptions I've gotten over the years from linux users.

    In other words, I believe selection clipboard cannot be used to overwrite a selection with a previous selection. Do you have an example of an editor that behaves differently around selection clipboard?

  6. added
    info-needed
    on Jan 19, 2020
  7. pdanpdan commented on Jan 20, 2020

    @pdanpdan
    Author

    I fixed my problem by remapping the current Shift+Insert to something else.
    What I want to point out is that now Shift+Insert is pointless if you want to override the current selection with the previously copied text.
    Maybe the When condition on the keyboard shortcut should include and text is not selected?

  8. alexdima commented on Jan 20, 2020

    @alexdima
    Member

    Popescu Dan (@pdanpdan) How does the default text editor that ships with your linux distro behave in this case?

  9. pdanpdan commented on Jan 20, 2020

    @pdanpdan
    Author

    The default editor only uses the mouse selection clipboard when invoked by middle-mouse-button.
    But the editor.selectionClipboard is perfect. I wasn't aware it's present on linux. Thank you.

  10. locked and limited conversation to collaborators on Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

confirmation-pendinginfo-neededlinux

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions