Pasted code lacks trailing newline
See original GitHub issueRepro:
- Consider following code in the Haskell scratch file:
main :: IO ()
main = pure ()
- Move caret to first line, then “Edit → Cut” it then “Edit → Paste” back
Expected: the code looks unchanged
Instead:
main :: IO ()main = pure ()
Environment:
IntelliJ IDEA 2018.2.5 (Ultimate Edition)
Build #IU-182.4892.20, built on October 16, 2018
JRE: 1.8.0_152-release-1248-b19 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.18.15-1-default
Issue Analytics
- State:
- Created 5 years ago
- Comments:35 (35 by maintainers)
Top Results From Across the Web
Why should text files end with a newline? - Stack Overflow
If content is added to the end of the file, then the line that was previously the last line will have been edited...
Read more >Sanitizing files with no trailing newline « \1 - backreference.org
As it happens, certain applications produce text files with the final newline character missing on the last line.
Read more >What's the point in adding a new line to the end of a file?
The C standard specifies that a C file should end with a newline (C11, 5.1.1.2, 2.) and that a last line without a...
Read more >Why is Vim adding a newline? Is this a convention? - Super User
then Vim won't add a trailing newline character at the end of the final line if the file didn't already have one. That...
Read more >"Revision file lacks trailing newline" on a "small" project
Hi, We have a SVN server on Solaris 8 with many repositories. To migrate, I do dumps. But for one repository, I have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have changed the id of the Haskell filetype so it overrides the default one of IntelliJ. So there is only Haskell file type left. Hopefully that fixes this issue.
I apologize: this time it is on me and the GPaste tool which had “trim items” option set to On.