[Github-comments] [geany/geany] Number of selected characters (#745)
elextr
notifications at xxxxx
Tue Dec 25 01:35:47 UTC 2018
> if it's a matter of counting columns it should be doable as Scintilla gives the column info, it's then a matter of counting how many columns are selected.
Thats what I said :)
> some "characters" take up more than one column -- the most obvious one being the tab character, which even takes a variable amount of columns
ditto :)
> My preference would probably go to counting the code points, regardless of their composition because that's the number of "items" stored in the file
But we are talking about the selection, not anything in a file
> but all these informations (bytes, code points, columns, composited characters) are useful in some situations and not in others.
Yep, which is the obvious problem with this sort of thing, too many possibilities, but for the selection I'm doubtful any of them are really useful for any common use-case.
> Geany uses UTF-8 internally, but that does not have to be the file's encoding
or the encoding of whatever you paste the selection into, IIUC it can be re-encoded when pasted, particularly on Windows.
And counting code points is fine, but what does it give you? Don't forget those combining characters Europeans like to use for their accented characters, two code points for one glyph :)
But if @andreysm has a specific use-case that needs one or other count then it should be no trouble to accept a well written pull request from somebody to add another % code to the status bar, nobody needs to show it if they don't want to.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/745#issuecomment-449784588
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20181224/eeb7f34e/attachment.html>
More information about the Github-comments
mailing list