[Github-comments] [geany-plugins] Add new "Lineoperations" plugin (#324)

Colomban Wendling notifications at xxxxx
Sun Jan 10 02:39:09 UTC 2016


> +	 * not all of this space will be used.)
> +	*/
> +	newfile   = g_malloc(sizeof(gchar) * (totalnumchars+1));
> +	nfposn    = 0;
> +
> +	if(newfile)    // verify memory allocation
> +	{
> +		for(i = 0; i < totalnumlines; i++)    // loop through opened doc
> +		{
> +			linelen = sci_get_line_length(doc->editor->sci, i);
> +
> +			if(linelen == 2)
> +			{
> +				line = sci_get_line(doc->editor->sci, i);
> +
> +				if(line[0] != '\r')

as `iswhitespaceline()` will recognize `\r` as a space, this code path is redundant with the `else if` below

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/324/files#r49270804
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160109/18c1e14a/attachment.html>


More information about the Github-comments mailing list