I sometimes noticed that using *
to search for a word under the cursor will sometimes have slightly different behavior (usually when I switch between different computers). The problem is that I am searching for a word that has a word in front of it (for example, a C ++ pointer). For instance:
MyPointer *foo; ... foo = new MyPointer();
When I move the cursor over the first occurrence of "foo", it usually searches for that exact word (for example, /\<foo\>
), but sometimes it will include the *
character in its search (for example, /\<*foo\>
) , because of which it cannot find any other occurrences of this variable, since it contains the *
character.
Does anyone know what causes this behavior and / or how to control it?
Chris source share