Vscode: Copy/Paste adds new line

Created on 11 May 2018  路  6Comments  路  Source: microsoft/vscode

Issue Type: Bug

Hi,

This started to happen after the last release, a very strange behaviour.

When editing JavaScript (haven't tested other), after copy/paste, the line below paste gets a new line. If you cmd+z, that new line disapears. See attached video: https://www.dropbox.com/s/13f8rh1uysx327w/New%20Line%20On%20Paste.mov?dl=0. All I did, was copy/paste the same value.

I'm not sure if this issue is vscode related or vscode-eslint related.

Thank you,
Marius

VS Code version: Code 1.23.0 (7c7da59c2333a1306c41e6e7b68d7f0caa7b3d45, 2018-05-03T15:23:14.634Z)
OS version: Darwin x64 17.5.0


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (8 x 2600)|
|GPU Status|2d_canvas: unavailable_software
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: unavailable_software
video_decode: enabled
video_encode: enabled
vpx_decode: enabled
webgl: enabled
webgl2: enabled|
|Load (avg)|2, 2, 2|
|Memory (System)|16.00GB (0.04GB free)|
|Process Argv|/Users/marius/Applications/Visual Studio Code.app/Contents/MacOS/Electron|
|Screen Reader|no|
|VM|0%|

Extensions (5)

Extension|Author (truncated)|Version
---|---|---
beautify|Hoo|1.3.0
vscode-eslint|dba|1.4.8
sublime-keybindings|ms-|4.0.0
debugger-for-chrome|msj|4.4.3
elm|sbr|0.17.0


*caused-by-extension editor editor-contrib

Most helpful comment

My problem was Beautfy extension.. don't know when I installed it but if I disable it, problem solved!

All 6 comments

It seems to be related to

"editor.formatOnPaste": true

Disabling that, fixes the extra new line.

I think there should be an option to disable the newline after pasting.

If you paste something inside a line block it adds a new line below too.

@bamse16 format != newline

I've using formatOnPase from the start and now I'm having this issue.. always, it inserts a new line

I am getting the issue too :(

Oh lol I think I solved the issue:

Add this into your VS Code settings:

"editor.autoIndent": false

My problem was Beautfy extension.. don't know when I installed it but if I disable it, problem solved!

Was this page helpful?
0 / 5 - 0 ratings