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, view it on GitHub, or mute the thread.