How to stop Edge from adding a new-line when copying from text boxes?

Discussion in 'Windows 11' started by Espionage724, Oct 8, 2021.

  1. Espionage724

    Espionage724 MDL Expert

    Nov 7, 2009
    1,051
    384
    60
    #1 Espionage724, Oct 8, 2021
    Last edited: Oct 9, 2021
  2. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,059
    3,345
    90
    A new line is not added for me either copying and pasting from here or the site in your link with Edge 94.0.992.38 with Windows 11 22000.194.
     
  3. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    2,583
    944
    90
    Yes, You are right, it's the case if to use such a copy method...
    This is due to the nature of the outdated copy method, which really moves the cursor always to a new line, but it does not add a new line to the copied area if there is no content.
    Years ago, then there were a large number of people, who wanted this to be the case, ie that the cursor always went to a new blank line. Now there is the opposite wish, no more want?
    The only way to get rid of it is to use a modern copying method. It is Select all => Copy => Paste or simply Ctrl+A => Ctrl+C => Ctrl+V
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    12,922
    62,587
    340
    Triple left click any line in the code box = add a new line
    manually highlight the the line = no new line

    this does not happen in IE11 or Opera 12.18 (Presto)
     
  5. Espionage724

    Espionage724 MDL Expert

    Nov 7, 2009
    1,051
    384
    60
    I just tested it with base Edge 90 (out-the-box on W11) and 94.0.992.38. Both added the new line.

    To empathize how annoying it can be to try to manually select large code boxes, this is a real snippet of one of my commands that I run for Linux to install and set-up nano, which is pretty innocent:

    Code:
    sudo zypper install 'nano' && export 'VISUAL=nano' && export 'EDITOR=nano' && echo -e 'export VISUAL=nano\nexport EDITOR=nano' | sudo tee '/etc/profile.d/editor-nano.sh' > '/dev/null' && cat '/etc/profile.d/editor-nano.sh' && mkdir -p ~/'.config/nano' && echo 'set nowrap' | tee ~/'.config/nano/nanorc' > '/dev/null' && cat ~/'.config/nano/nanorc'
    But then I have something like this which will gladly without prompt obliterate data on a NVMe drive, and at times I need to switch to nvme1 instead. Having that just run unexpectedly wouldn't be fun :p

    Code:
    sudo blkdiscard --force --verbose '/dev/nvme0n1' && sync && sudo nvme format '/dev/nvme0' --force --namespace-id='1' --lbaf='1' --reset --ses='1' --pil='0' --pi='0' --ms='0' && sudo rm -f '/sys/firmware/efi/efivars/'* || sync