This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 143309 - carriage return, line feed, EOL mix
Summary: carriage return, line feed, EOL mix
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@editor
Depends on: 72515 4619 132679
  Show dependency tree
Reported: 2008-08-08 15:32 UTC by jpl
Modified: 2008-08-18 09:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description jpl 2008-08-08 15:32:44 UTC
When saving _some_ files, the editor keeps adding CR at the end of lines.
Sometimes only to the recently added lines, sometimes to all the lines.
I don't want them, even if I am using Windows.
I should be able to see those special chars from Netbeans (only the version control tells me about it).
I should be able to enforce the "Unixness" on a file or on a project.
vim: set list, set ff=unix
Comment 1 Vitezslav Stejskal 2008-08-11 10:38:38 UTC
Strange. What EOL characters were in the file before you opened it in the IDE? The IDE detects EOL chars and keeps using
those that it found. Obviously, in newly created files the IDE uses the default EOL character for your operating system.
Comment 2 jpl 2008-08-12 09:34:21 UTC
I think I created the file in Netbeans, then made a dos2unix from cygwin shell.
I understand the default behavior of Netbeans is the best bet, but I would like to override it and have any newly
created/generated text file without CR, and also be able to see (and clean) the CR directly from Netbeans.
Comment 3 jpl 2008-08-12 11:25:18 UTC
> also be able to see (and clean) the CR directly from Netbeans

The same could apply to other special chars like trailing spaces and tabs.
Comment 4 Vitezslav Stejskal 2008-08-18 09:29:36 UTC
> I think I created the file in Netbeans, then made a dos2unix from cygwin shell.

Well, you can do that, just make sure that you close the IDE before running dos2unix, then start the IDE and open the
files. The IDE should preserve unix EOL characters and keep using them for the converted files. It's not very nice
workaround, but should help.

As for the ability to choose EOL characters that should be used in the IDE, there is issue #132679 (No way to define eol
characters) requesting this. There is also #72515 requesting an ability to change EOL chars used in an opened file.
Finally, there is #4619 requesting to show non-visible characters such as EOLs and tabs.

Assuming that the suggested workaround works for you this issue is a duplicate of the above RFEs and as such I'm closing
it. Please reopen if the workaround does not work. Thanks