User forums > Using Code::Blocks

bug in "Settings->Editor->End-of-line options"

(1/2) > >>

frithjofh:
hi, everybody,

I'm not sure, but I think there is a bug in the mechanics of the "End-of-line mode" control. If a file is open and some change to that file is done and you don save the file, then change the EOL mode in the settings to another one, then change the EOL mode back to the former, all the EOL of that file are changed to that other mode.

Steps:
a) you start c::b with the EOL setting LF and edit a file
b) you change the EOL setting to CR
c) you change the EOL setting to LF
-> all EOL in the file are changed to CR

this seems to happen no matter what EOL mode the loaded file has, or even if it has mixed EOL's

So far the bug, if it really is one and not only a figment of my imagination  :)

And I have a question: is there any function inside of c::b to know what EOL mode an open file has? And: does it matter if a file isn't pure in it's EOL's? And: why does c::b respect the EOL's of a file when they are different from the systems EOL mode?

regards

frithjof 

oBFusCATed:
Turn off the "Ensure consistent EOL" option, if after that you get the same behavior, this is a bug

frithjofh:
the "Ensure consistent EOL" was not turned on. behavior as above.

Jenna:

--- Quote from: nausea on June 10, 2010, 11:14:19 am ---the "Ensure consistent EOL" was not turned on. behavior as above.

--- End quote ---
I can confirm this bug and will try to dig into it deeper.

frithjofh:
there is another strange detail to the bug: if there are more than one files open the bug works as described. but aditionally if you switch to another file that file gets affected too: all EOL's are changed and the files status changes to "edited but not saved". this happens to all files you swich to and even with files that are opened now.

regards

frithjofh

PS: this bug doesn't seem very important. I actually stumbled over it by mistake  :?

Navigation

[0] Message Index

[#] Next page

Go to full version