notepad2-mod icon indicating copy to clipboard operation
notepad2-mod copied to clipboard

Incorrect selected characters count

Open ghost opened this issue 9 years ago • 6 comments

r970 If I use multibyte encoding, non-ascii characters (e.g. cyrillic) in selection counted twice.

ghost avatar Feb 10 '16 10:02 ghost

it shows the bytes, not characters.

zufuliu avatar Jan 27 '17 15:01 zufuliu

@zufuliu exactly This is wrong because in text editor user operates with characters and lines of text, not bytes.

ghost avatar Jan 27 '17 15:01 ghost

@skz169 if you can build Notepad2 from source, try this one: https://github.com/zufuliu/notepad2

zufuliu avatar Jan 27 '17 15:01 zufuliu

@zufuliu: please make a PR

XhmikosR avatar Jan 27 '17 16:01 XhmikosR

@XhmikosR I will, after the previous one been merged. A sample text: (I don't known how to add image here)

qwaε<The TAB Char '\t'>αβγδσοβξ

when "αβγ" is selected, the status bar shows:

Ln 1/1 Col 9/16 Ch 6/13 Sel 6/3 SelLn 1 Fnd 1

The format is: Ln current line number/total line count in document, as before. Col current column/total column in current line. Ch current character position/total characters in current line (borrow from Visual Studio). Sel selected bytes count/selected characters count. SelLn total selected line count. Fnd selected text occurrences count.

zufuliu avatar Jan 28 '17 03:01 zufuliu

Related issues for show total found count https://github.com/XhmikosR/notepad2-mod/issues/119, https://github.com/XhmikosR/notepad2-mod/issues/135 and https://github.com/XhmikosR/notepad2-mod/issues/168.

zufuliu avatar Jul 29 '18 01:07 zufuliu