On 19 Nov 2018, at 11:03 pm, Manuel Gómez <[email protected]> wrote:
> 
> This pointed me in the right direction. If I change this:
> 
>          setSelection(line, 0, line, lineLength(line));
> 
> by this:
> 
>        indexTo = lineText.endsWith("\r\n") ? lineLength(line)-1 : 
> lineLength(line);
>        setSelection(line, 0, line, indexTo);
> 
> I get correct results in both file formats. If this is the expected behaviour 
> (I didn't expect for text(line) to include line terminators, nor for 
> lineLength to count them), I can leave it as is.

Just to confirm, that is the expected behaviour.

Phil
_______________________________________________
QScintilla mailing list
[email protected]
https://www.riverbankcomputing.com/mailman/listinfo/qscintilla

Reply via email to