[Github-comments] [geany/geany] g_print and g_printerr handlers: don't add a newline (#2309)

Nick Treleaven notifications at xxxxx
Sat Sep 21 16:10:48 UTC 2019


The GLib docs say: "Typically, format should end with its own new-line character":
https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-print

* Not including a newline is more flexible as the caller can conditionally print part of a line, then the remaining part and a newline.
* Almost all the uses of g_print and g_printerr in geany and geany-plugins already include a newline at the end of `msg`. Printing two newlines is annoying.
* This adds a newline for the remaining cases in geany.
* I have a pull ready for geany-plugins, will edit this line when submitted. Only needed to change one line.
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/2309

-- Commit Summary --

  * g_print handler: Don't add newline
  * g_printerr handler: Don't add newline

-- File Changes --

    M src/log.c (8)
    M src/pluginutils.c (2)
    M src/tagmanager/tm_workspace.c (2)
    M src/utils.c (4)

-- Patch Links --

https://github.com/geany/geany/pull/2309.patch
https://github.com/geany/geany/pull/2309.diff

-- 
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/pull/2309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190921/78bd0ff6/attachment.html>


More information about the Github-comments mailing list