<blockquote>
<p>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.</p>
</blockquote>
<p>Thats what I said :)</p>
<blockquote>
<p>some "characters" take up more than one column -- the most obvious one being the tab character, which even takes a variable amount of columns</p>
</blockquote>
<p>ditto :)</p>
<blockquote>
<p>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</p>
</blockquote>
<p>But we are talking about the selection, not anything in a file</p>
<blockquote>
<p>but all these informations (bytes, code points, columns, composited characters) are useful in some situations and not in others.</p>
</blockquote>
<p>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.</p>
<blockquote>
<p>Geany uses UTF-8 internally, but that does not have to be the file's encoding</p>
</blockquote>
<p>or the encoding of whatever you paste the selection into, IIUC it can be re-encoded when pasted, particularly on Windows.</p>
<p>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 :)</p>
<p>But if <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=5417382" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/andreysm">@andreysm</a> 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.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/745#issuecomment-449784588">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ8Ugf3uuG-TN7HgcnC4RpOmlbtUQks5u8YDzgaJpZM4Ge8tv">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ_bmDoF1cJ8MkoQbuoVLbKhnyFeCks5u8YDzgaJpZM4Ge8tv.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@elextr in #745: \u003e  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.\r\n\r\nThats what I said :)\r\n\r\n\u003e some \"characters\" take up more than one column -- the most obvious one being the tab character, which even takes a variable amount of columns\r\n\r\nditto :)\r\n\r\n\u003e 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\r\n\r\nBut we are talking about the selection, not anything in a file\r\n\r\n\u003e but all these informations (bytes, code points, columns, composited characters) are useful in some situations and not in others.\r\n\r\nYep, 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.  \r\n\r\n\u003e Geany uses UTF-8 internally, but that does not have to be the file's encoding\r\n\r\nor the encoding of whatever you paste the selection into, IIUC it can be re-encoded when pasted, particularly on Windows.\r\n\r\nAnd 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 :)\r\n\r\nBut 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."}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/745#issuecomment-449784588"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/745#issuecomment-449784588",
"url": "https://github.com/geany/geany/issues/745#issuecomment-449784588",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>