[Github-comments] [geany] Rewrite scope completion 2 (#505)

Jiří Techet notifications at xxxxx
Sat Jan 9 22:26:25 UTC 2016


>  			pos--;
> -		else if (ft->id == GEANY_FILETYPES_CPP && pos >= 3 && match_last_chars(sci, pos, "->*"))
> +
> +		if (pos > 0)
> +			typed = sci_get_char_at(sci, pos - 1);
> +	}
> +
> +	if (typed == '.')
> +		pos -= 1;
> +	else if (ft->id == GEANY_FILETYPES_C || ft->id == GEANY_FILETYPES_CPP ||
> +		ft->id == GEANY_FILETYPES_PHP || ft->id == GEANY_FILETYPES_RUST)
> +	{
> +		if (match_last_chars(sci, pos, "::"))

Good idea. Even though for ASCIIDOC and TXT2TAGS it returns some dummy character (that nobody will ever enter so we don't have to worry), for the rest of the languages it really seems to return the scope separator used in the language itself. Will change it this way.

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


More information about the Github-comments mailing list