4 ms·
Does anyone know if there's a trick to avoid the trailing newline when double-clicking a line to copy/paste it elsewhere? This always annoys me for single-line
by randomfool 5y ago
Does anyone know if there's a trick to avoid the trailing newline when double-clicking a line to copy/paste it elsewhere?
This always annoys me for single-line commands. I'd love a CSS solution but can only think of some ugly JS approaches.
- alpaca128 5y agoI hate that too, and it seems to be a very common default behaviour of text selection. Even Vim does it when you copy a whole line. It's one of those little UI annoyances that refuse to disappear. Just like blinking cursors in unfocused input fields & windows.
- arthur2e5 5y agoIt probably ties into the whole “line ending not newline” philosophy of requiring files to end with an EOL character.
- Someone 5y agoI think that’s because, if you follow selection of a full line by a backspace/delete/cut, you expect the new line to disappear. Apart from undo state, you also want cut to be equivalent to copy; backspace.
- contravariant 5y agoI mean you can probably fix this with autohotkey. Whether this is a good idea is a whole different matter.