[Github-comments] [geany] Rewrite scope completion 3 (#862)

Jiří Techet notifications at xxxxx
Mon Jan 11 22:21:25 UTC 2016


>  	}
> -	else if (typed != '.')
> -		return;
> +
> +	if (typed == '.')
> +		pos -= 1;
> +	else if (match_last_chars(sci, pos, context_sep))
> +		pos -= strlen(context_sep);
> +	else if ((ft->id == GEANY_FILETYPES_C || ft->id == GEANY_FILETYPES_CPP) &&
> +			match_last_chars(sci, pos, "->"))
> +		pos -= 2;
> +	else if (ft->id == GEANY_FILETYPES_CPP && match_last_chars(sci, pos, "->*"))
> +		pos -= 3;
> +	else

Well, unless the \ is needed for something else, I'd suggest "normalizing" the scope upon receiving the tag from the ctags parser by replacing the \ with :: so we don't have to care later.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/862/files#r49388189
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160111/62f0621d/attachment.html>


More information about the Github-comments mailing list