In general these sort of discussions are not helped by the imprecise 
terminology used by Scintilla (inherited from long ago Windows where it was 
first developed IIUC) and therefore by Geany, character and column.

A "character" approximately maps to a Unicode code point, but I am not gonna 
guarantee that nowhere in the Geany manual is "character" used where the writer 
meant "byte".

A "column" has never existed since ASCII 80x24 terminals.  The concept does map 
to glyphs for ASCII, but not otherwise since glyphs are not the same width and 
so "columns" do not map toglyphs or characters when:

- non-monospaced fonts are used
- CJK characters are used (mostly double wide)
- Symbols are used
- zero width characters are used
- combining characters are used.

When typing English text for sure these are not needed every character, but 
even then CJK and combining characters are needed for names, for example the ö 
in the name of one of Geany's esteemed originators is made from lower case 
ASCII `o` and `U+308`, thats two "characters" for one "column".

A specific comment as well:

>  use "72" not 73 for PEP8

The use-case for line breaking is not code line length assurance, it does not 
know anything about Python (in the PEP8 case) or any other programming 
language, so it could easily generate illegal code when breaking at arbitrary 
places, and for a setting B the break happens when the Bth character is typed 
(or the Bth line character when reflowing which is just line breaking applied 
to a selection/paragraph).  The use-case for line breaking (and reflow) is for 
human language text, where breaks are less semantic and breaking at spaces 
works for most Western languages at least.

The use-case for the long line is for indicating code that exceeds some "limit" 
without actually performing a break and causing chaos in the code, here a 
setting of N (eg 72) will allow N single width glyphs before the vertical line, 
and since code is usually edited monospaced it works ... so long as no comments 
or strings or identifiers have non-ASCII characters in them :grin:. (yes Python 
and other languages even C++ and soon C gasp!! identifiers can be non-ASCII, 
think math `Σx = sum(x)`)


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2078#issuecomment-1722611609
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/2078/[email protected]>

Reply via email to