@b4n commented on this pull request.


In src/ui_utils.c:

> @@ -2096,6 +2096,33 @@ void ui_table_add_row(GtkTable *table, gint row, ...)
 }
 
 
+/* comment-out all lines that are not already commented out except sections */
+static void comment_conf_files(ScintillaObject *sci)
+{
+	gint line, line_count;
+
+	line_count = sci_get_line_count(sci);
+	for (line = 0; line < line_count - 1; line++)
+	{
+		gint pos_start = sci_get_position_from_line(sci, line);
+		gint pos_end = sci_get_position_from_line(sci, line + 1);

shouldn't you use sci_get_line_end_position() instead? It'd avoid checking EOL (which might or might not be faster, depending on the implementation of the above), and be ever so slightly more robust (in case EOL doesn't pass isspace(), but that's rather theoretical).


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3413/review/1336093794@github.com>