codebrainz commented on this pull request.
> @@ -2475,6 +2474,7 @@ void editor_insert_text_block(GeanyEditor *editor,
> const gchar *text, gint inser
/* count indent size up to insert_pos instead of asking sci
* because there may be spaces after it */
gchar *tmp = sci_get_line(sci, line_start);
+ gint idx;
idx = insert_pos - sci_get_position_from_line(sci, line_start);
> Why is that? Isn't 0 the first position in the buffer, like for inserting at
> the very start?
Yeah maybe I'm confused, I was just thinking with an empty document (with one
newline), if `insert_pos` is 0 and `sci_get_position_from_line()` returns 1 it
would index `tmp` with -1.
--
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/1561#discussion_r129734157