@Ict-MylabDev said in Error with newlines from barcode scanner:
found that turning off “Enable auto-completion on each input” solved the problem.
I have no idea what this feature is doing exactly.
Specifically, what is happening: as you continue to scan CODE39 with the barcode scanner, it is typing C O D E 3 9 EOL. With autocompletion turned on, the first time through, Notepad++ auto-complete doesn’t do anything (nothing to autocomplete, because it’s never seen that before). The second time, after n characters from CODE39, the autocompletion mini-window appears (because it recognized the start of CODE39, which it has now previously seen), and it keeps matching as the scanner types the remainder of CODE39; the EOL at the end of the barcode scan, instead of inserting a newline in Notepad++, is used to select the active word from autocomplete, so it just leaves CODE39 but stays on the same line. The third barcode scan starts on that second line, but since it’s extended the text beyond CODE39 to CODE39C..., it isn’t matching, so the third EOL goes to Notepad++, to move the cursor to the third line. Similar sequences occur on future rows, which explains why it grows for a while. Apparently, it hits a maximum length for autocomplete on the 12th line, hence it just stays the same length, because it listens to that lase EOL on that line.
(This can be replicated on your own without a barcode scanner by just turning on the autocomplete, and typing (not just pasting) CODE39 followed by a newline many times.)