Code folding copy / paste bug

  • First of all i like to use notepad++ very often and this bug is making the experience not pleasant. Its a basic feature, not part of any plugin. Whenever i am editing html or any code foldable extension (*.xml) and use code folding with copy/paste it is not working.

    I select a code folded block, copy it and paste somewhere, instead of whole block copied it pastes only first row and that is not desirable, what if i want to select & copy/paste 20 pages from 80 pages html doc? i dont want having to scroll 20 pages to select 20 pages large div block, i need to be able to fold it and copy whole contents of it, same way as eg. in visual studio does.

    In every update i am silently expecting this to be fixed, but it haven’t happened yet. So i am writing to this board in hope it will resonate.

    Thank you

  • Hello @jaroslav-daníček,

    But, it is, indeed, the N++ behaviour, too !

    For instance :

    • Open some HTML file

    • Now, fold any section

    • Place the cursor at the first column of the unique visible line of this section

    • Perform a Shift + Down Arrow action

    • Perform a Ctrl + C action

    • Open a new tab ( Ctrl + N )

    • Paste the clipboard contents ( Ctrl + V )

    As expected, all contents of the folded section appear, in the new tab ;-))

    Best Regards,


  • then its not user friendly behavior, sorry to say that :/ I dont see any advantage in having to do extra step, when it could work instantly. Still, thanks for reply

  • @Jaroslav-Daníček

    I assume you didn’t get the info from @guy038 right.
    There is no additional step needed, to get this working.
    It is just a little bit different to what you might think it is.

    Mouse usage:
    Instead of selecting the line from start of the line and move the mouse to the end of the line
    you select the start position and move the mouse one line down.
    Now you have selected the whole block. Copy and paste.

    Keyboard usage:
    Instead of pressing SHIFT+END you do what @guy038 wrote, press SHIFT+Down Arrow. Copy and paste.


  • @Jaroslav-Daníček said:

    having to do extra step, when it could work instantly

    Specifically, what is this “extra step” you are talking about?

  • @Jaroslav-Daníček ,

    And the reason why Shift+DownArrow works but Shift+END does not: if you use Shift+END, you are just selecting to the end of the current line, so the selection doesn’t contain any of the collapsed data (none of the data is before the end of the current line, after all). Using Shift+DownArrow, you are selecting from your current location to the beginning of the next visible line; since the next visible line is beyond the end of the collapsed data, your selection includes all the collapsed data.

Log in to reply