Bah, I thought I'd commented it. :s

When completing class names, omnisharp includes brackets in the completion
text. Thus 'SomeCl' will give a completion of 'SomeClass()'. This is
obviously a correct completion, but it's often not what you want. So this
code strips off the brackets for any candidate that has no type (and is
thus probably a class or constructor).

There's another small hack in there - for some reason one of the
completions I get back is sometimes the text being typed in, even if it
isn't a valid completion. So, typing 'SomeCl' can give me a completion of
SomeCl(), even though SomeCl() doesn't exist. For now I'm just filtering
these results, so I haven't bothered pulling proper repro steps together
yet...

On 21 Aug 2013, at 23:46, nosami <notifications@github.com> wrote:

In omnisharp.el:

>      (if (and func-start-pos (> func-start-pos 0))
>          (let ((func-return (substring display 0 func-start-pos))
>                (func-body (substring display func-start-pos)))
> -          (concat func-body omnisharp-company-type-separator func-return))
> -      display)))
> +          (setq output (concat func-body omnisharp-company-type-separator func-return)))
> +	  (let ((brackets-start (string-match "()" display)))
> +		(when brackets-start
> +		  (setq output (substring display 0 brackets-start)))))

Guys, if I had the vaguest idea what this fixed, I'd help :)

—
Reply to this email directly or view it on
GitHub<https://github.com/sp3ctum/omnisharp-emacs/pull/32/files#r5911780>
.