Selected character and row count
if col==1 and lines>1 then lines=lines-1 and chars=chars-2 (CR+LF) or chars=chars-1 (LF or CR).
I think you are going to have to say a bit more on that before people are really going to understand your meaning…
OK, sorry! In fact, not to mention that the “pseudocode” is not correct.
In the status bar of Notepad++, there is an indicator of the current row and column and of selected characters and rows. Something like
Ln: 1 Col : 1 Sel 0 | 0
If the selected text starts on one line and ends on another, the selected character count includes the hidden characters (CR+LF in Windows). In my opinion, they should not be counted.
If the selected text starts on one line and ends on another, the line count includes the ending line, even if the caret is in column 1 of that line. In my opinion, if the caret is in column 1 of the final line, it should not be counted.
I hope I have been clearer now.
Your first point:
the selected character count includes the hidden characters (CR+LF in Windows)…they should not be counted.
Hmmm, guess I don’t see why they shouldn’t be included in the count; they are there, taking up space.
I agree with you on your second point; see this thread I created a long time ago: https://notepad-plus-plus.org/community/topic/13087/sel-in-status-bar-is-off-by-1-on-line-count