[Github-comments] [geany] Hang on "Reflow" with lots of spaces (#848)

Matthew Brush notifications at xxxxx
Mon Jan 4 18:03:22 UTC 2016


> Maybe we'd like to trim repeated spaces, but that might also be unwanted… not sure. What do you think?
I don't think we should ever trim inner (not start or trailing) whitespace, unless after re-flowing, it winds up at the end of the line (in which case we could be extra smart and use the "strip trailing whitespace" setting to decide whether to strip it). The code appears to already handle leading indent/whitespace. 

> Also the reflow code has weird behavior regarding tabs, maybe we should also allow splitting on tabs (or even g_ascii_isspace())?

Yes, I noticed the code compares to `GDK_space` which seems a bit weird, but I guess it's probably an ASCII space character (decimal 32). It seems like it would make more sense to consider all (at least ASCII) white space characters. If we wanted to handle it better, we could probably also use [`g_unicode_isspace()`](https://developer.gnome.org/glib/stable/glib-Unicode-Manipulation.html#g-unichar-isspace), but that's a slippery slope.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/848#issuecomment-168753542
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160104/187e7980/attachment.html>


More information about the Github-comments mailing list