If there is only a single candidate, we jump directly to its definition or reference.
This only affects counsel-gtags-dwim and does not change the behaviour of counsel-gtags-find-definition, counsel-gtags-find-reference and counsel-gtags-find-symbol.
The reason for this is that point might not be on the symbol you want to search for when calling counsel-gtags-find-definition, which could lead to an unintentional jump. To avoid this you would have to make sure that point is not an a symbol before calling counsel-gtags-find-definition which would be rather annoying. The same reasoning applies to counsel-gtags-find-reference and counsel-gtags-find-symbol.
On the other hand, when calling counsel-gtags-dwim, the user is obviously interested in the definition or reference at point, therefore the jump is always intentional. I hope this makes sense.
If there is only a single candidate, we jump directly to its definition or reference.
This only affects
counsel-gtags-dwim
and does not change the behaviour ofcounsel-gtags-find-definition
,counsel-gtags-find-reference
andcounsel-gtags-find-symbol
. The reason for this is that point might not be on the symbol you want to search for when callingcounsel-gtags-find-definition
, which could lead to an unintentional jump. To avoid this you would have to make sure that point is not an a symbol before callingcounsel-gtags-find-definition
which would be rather annoying. The same reasoning applies tocounsel-gtags-find-reference
andcounsel-gtags-find-symbol
. On the other hand, when callingcounsel-gtags-dwim
, the user is obviously interested in the definition or reference at point, therefore the jump is always intentional. I hope this makes sense.This fixes issue #7