WrapEarnPass left a comment (geany/geany#1950) The cause appears to be due to ```utils_get_line_endings``` from utils.c. There is a weighting process for opening an existing file, but it does not account for an existing 0 len file. Leading to prefer LF regardless of the current preferences. This also causes a full scan of the file on each load, in addition to any other loading processes. I suggest two options.
Option 1: 1. add a configuration specifying the current process as default Preferences>Files>Default end of line characters: "Default (AUTO)". 2. refactor utils_get_line_endings to not read the entire file if a preference is set other than Default (AUTO), and kick line endings to the preference. I don't believe this change will impact existing users. Option 2: Use only the existing "Preferences>Files>Default end of line characters" in place of utils_get_line_endings I believe this option will cause some impacts as previously saved files will suddenly start honoring the preference, rather than being set by file weighting. I believe this option to be the better choice though. Byte by byte scanning a file to get line endings seems painful. Objections? Causes for concern? -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1950#issuecomment-5084627855 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany/issues/1950/[email protected]>
