Please help me fix this !
I guess you installed some plugin.
Try sublime.log_commands(True) in the console to see what is called when you type paste, it should help identified which plugin is creating the issue.
You you reproduce it on a clean install?
It seems that you are coping the whole with empty selection. You need to select the text you want to copy, otherwise it will paste the whole line. Related:
i did a fresh install and using with no plugins. The error reproduces even on fresh install
You need to select the text, if want to copy and paste it, otherwise if you do it on a line without any selection, it will also copy the whole line + the new line character, and when you paste it, it will paste the whole line + the new line character, which will create a new line above the current position.
You can replace the default behavior by creating a Sublime Text macro and a key bind for it on the Ctrl+C
key:
Packages/User/SelectLineNoEOL.sublime-macro
[
{ "command": "move_to", "args": { "to": "hardbol" } },
{ "command": "move_to", "args": { "to": "eol", "extend": true } },
{ "command": "copy" },
]
Default.sublime-keymap
{ "keys": ["ctrl+c"], "command": "run_macro_file",
"args": {"file": "res://Packages/User/SelectLineNoEOL.sublime-macro"},
"context":
[
{
"key": "selection_empty", "operator": "equal",
"operand": true, "match_all": true,
},
],
},
I think I had saw another thread with a plugin which does this, but I could not find it.
Related threads:
I was having the same bug in all file extensions. I have solved it by removing the bugged plugin “Emmet Style Reflector”.