[Github-comments] [geany/geany] Line wrap calculation problems (#1495)

elextr notifications at xxxxx
Tue Sep 22 23:49:37 UTC 2020


You seem to be misunderstanding how tabs work, they do not align things, they simply move the next character to the next tab stop.  The location of tabs stops is the pixel location at the position of every n spaces in the default font, where n is set in preferences and defaults to 4. 

Of course since those positions are the same on each line, tabs can be used by humans to make things align.  

But what to do when wrapping?  Re-tab the wrapped part of the text, or tab based on the full line and copy that number of pixels when wrapping.   Either could be considered valid, and Scintilla appears to do the second, probably because it is less costly, and wrapping is already very expensive.

But since wrapped tabs are just a number of pixels this means that the position of the `--` is determined by the number of non-tab characters before the tab, so it can take positions that are not on tab stops.

-- 
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/1495#issuecomment-697040573
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20200922/e8e7dba7/attachment.htm>


More information about the Github-comments mailing list