Error showing search results for a file with mixed EOL
Posted: Mon Sep 20, 2021 4:49 pm
I'm having a file "1.h" with ANSI encoding and mixed line endings: the most part of the file has "\n" line endings, but some lines have "\r\n" line endings.
The beginning of the file has "\n" line endings:
Then this part has "\r\n" line endings:
The rest of the file has "\n" line endings again.
Now, I'm searching for a word eee2 in this file and here is what TextCrawler Pro 3.1.2 shows me with its option "No. lines to display above/below found text" set to 2 :
As you can see, the line numbers are incorrect as well as the text around the match is also incorrect...
Could it be because TextCrawler expects "\r\n" line ending everywhere but in fact it is "\n" ?
The beginning of the file has "\n" line endings:
Code: Select all
// 1.h
#include "aaa.h"
#include "bbb.h"
#include "ccc.h"
#include "ddd.h"
...
Code: Select all
enum EnumType : unsigned int {
eee1 = 0,
eee2,
eee3
};
Now, I'm searching for a word eee2 in this file and here is what TextCrawler Pro 3.1.2 shows me with its option "No. lines to display above/below found text" set to 2 :
Code: Select all
C:\Temp\1.h
1 // 1.h
2 #include "aaa.h"
3 eee2,
4 #include "ccc.h"
5 #include "ddd.h"
Could it be because TextCrawler expects "\r\n" line ending everywhere but in fact it is "\n" ?