There are not files with \r-only line endings (#4450)

This commit is contained in:
JoveToo authored and GitHub committed 2022-05-25 16:01:31 +02:00
1 parent 9491db60da
commit cd7f44cb57
1 file changed
-4
@@ -522,10 +522,6 @@ $(function () {
var findThis = self.settings.settings.plugins.gcodeviewer.skipUntilThis();
if (findThis && findThis !== "") {
var indexPos = response.indexOf("\n" + findThis);
// Try windows newlines if not found
if (indexPos === -1) {
indexPos = response.indexOf("\r" + findThis);
}
if (indexPos !== -1) {
// Slice and make sure we comment out any string left back after slicing - so if a user configures something like "G1" we dont end up with a snippet of gcode commands
// Yes it would be prettier to parse it line by line and remove the entire line, that is very slow and uses mem - this way we find the string, and remove it