Giter Club home page Giter Club logo

Comments (9)

alankilborn avatar alankilborn commented on June 10, 2024 1

Now try the legacy command prompt

OK, but I was merely "playing along" anyway...

Do we really care that Notepad++ is copying its exact data to the clipboard?
Is there some sort of requirement that data copied to the clipboard is provided with Windows' CRLF line-endings?

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 10, 2024

Can't replicate under 8.6.2.

Multiple lines copied from Notepad++ paste just fine into a cmd window:

image

leads to this in the cmd window after attempting to paste:

image

from notepad-plus-plus.

AndiKiissel avatar AndiKiissel commented on June 10, 2024

This happens if End-Of-Line is not Windows CRLF:

image

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 10, 2024

@AndiKiissel

This happens if End-Of-Line is not Windows CRLF

For me, I get the same Warning prompt as I got before, even with LF line endings, or CR line endings in my Notepad++ tab.

from notepad-plus-plus.

rdipardo avatar rdipardo commented on June 10, 2024

For me, I get the same Warning prompt as I got before, even with LF line endings, or CR line endings in my Notepad++ tab.

Now try the legacy command prompt that @AndiKiissel is using, not the Windows Terminal app

  1. (Windows key) + R
  2. Run conhost.exe

from notepad-plus-plus.

AndiKiissel avatar AndiKiissel commented on June 10, 2024

I only showed how it can happen, I don't think it needs to be changed.

from notepad-plus-plus.

ronww avatar ronww commented on June 10, 2024

I ran a test script in a cmd window, trying it with different line endings. When I pasted from other applications, line endings were present. But pasting from Notepad++, there were none.

But, apparently is an issue with the older version of Notepad++ that my employer has deployed to our PCs.

from notepad-plus-plus.

alankilborn avatar alankilborn commented on June 10, 2024

It would still be a "problem" with any version of Notepad++.
But the question remains: If it is a typical Copy to clipboard, and not some sort of Copy Special, should LF-only (or CR-only) line endings be converted to CR+LF, at the time of the copy?

This is not a problem when pasting into Notepad++, because Scintilla paste functions automatically convert incoming line-endings to be appropriate for the current tab's line-ending format.

So the argument is: Notepad++ is liberal in what it accepts (converting as necessary) but not so strict in what it sends -- should it be equally-friendly BOTH ways? Maybe I'm stating it poorly, but see Postel's Law.

from notepad-plus-plus.

ronww avatar ronww commented on June 10, 2024

After reading recent alankilborn's post, I did some more experiments on my personal PC (after installing Notepad++ 8.6.2).

Turns out the problem is that cmd is not just ignoring the non-CRLF line endings, but discarding them.

Eclipse, FireFox and LibreOffice accept pastes with LF line endings. I don't know about other applications.

So, other than possibly adding a "special copy" feature, this turns out to not be a Notepad++ issue.

from notepad-plus-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.