konsole

Konsole removing leading whitespace when copy pasting?


I don't know if I changed something, or because a newer version changed behavior, but whenever I copy something that has indentation, the resulting text in my clipboard has its indentation removed (text on ever new line starts at column 0).

This is extremely annoying, as I regularly copy/paste from things like YaML and docker compose files and need to re-do the indentation.

Can't find an option that seems related to this. Anyone any ideas/tips?

I'm running Manjaro 6.3 with KDE Plasma 5.27


Solution

  • I've been annoyed by this exact same issue, this seems to be something that was introduced recently. I clicked around in the settings and found a solution. In the top menu bar, go to:

    Settings
        => Edit Current Profile
        => Mouse - Ensure 'Text interaction' tab is selected
        => Uncheck 'Trim leading spaces'
        => OK
    

    Your leading spaces should be preserved now.