I'm using jEdit in XP and it incorrectly shows one less newline at the end of files.
So I have a file like this (ignore quotes) (works correctly in notepad):
"START OF FILE
This is a test to see if the function GetContentsOfFile() works.
It should get this text from this file.
END OF FILE <--- so basically there is a new line here.
"
But jEdit shows this:
"START OF FILE
This is a test to see if the function GetContentsOfFile() works.
It should get this text from this file.
END OF FILE" <--- the newline doesn't show in jEdit
I believe this to be a bug... it may seem minor but it has caused issues when editing
PHP files, as PHP doesn't always like trailing newlines after the end ?> tag. It
also caused an issue with my unit tests because the contents of the file that I created
in jEdit had one more newline that I thought. I have therefore classified it as a
'normal' bug rather than minor as it's knock on effect can have quite an impact...
but feel free to reset to 'minor' as I can see your point of view on that decision
if that's what you decide to do :)
Can anyone confirm this behaviour?
Submitted | *anonymous - 2010-04-19 16:14:55 | Assigned | kpouer |
---|---|---|---|
Priority | 5 | Labels | editor core |
Status | open | Group | normal bug |
Resolution | None |
2010-04-19 16:14:55 *anonymous |
Contents of file test |
---|---|
2010-04-19 16:34:24 *anonymous |
I've just unchecked 'hide final end of line (if any)' in Global Options... but this
did not fix the issue. Indeed I believe I've found a bug in this feature.
|
2010-04-19 16:45:53 *anonymous |
Note the issue regarding 'hide final end of line (if any)' not showing any change relates to currently open buffers only. |
2010-04-19 17:19:37 *anonymous |
How about Global Options -> Text Area -> Hide final end of line? |
2010-04-19 17:30:46 rschwenn |
As already said, the issue is that "Global Options -> Text Area -> Hide final end
of line" doesn't takes effect immediately. The buffer seems to be need a reload for
the change to take effect, which is surprisingly for me, too.
|
2010-04-19 17:30:46 rschwenn |
- **summary**: jEdit showing one less trailing "newline" --> "Hide final end of line" doesn't takes effect immediately |
2010-04-20 18:28:53 *anonymous |
I think the location of this option is wrong. The way it is implemented, the last
EOL is dropped from the contents of the buffer when the buffer is loaded - it has
nothing to do with the text area itself. Maybe this would resolve the confusion?
|
2010-04-20 20:40:03 *anonymous |
It doesn't seem clear to me what you are suggesting shlomy.
|
2010-04-21 06:05:26 *anonymous |
The way it is implemented, it is not directly related to the text area. Of course
it is reflected in the text area as well, but it's not just hiding the last EOL from
the user in the text area. The actual buffer content is changed during the entire
editing. E.g. if you use macros that retrieve the text of the buffer, this final EOL
will also be missing.
|