Pure-D / workspace-d

CLI deprecated, API + functionality moved into https://github.com/Pure-D/serve-d
MIT License
75 stars 15 forks source link

Find declaration returns declaration of character in front of cursor Fixes Pure-D/code-d#237 #98

Closed jonathanballs closed 5 years ago

jonathanballs commented 5 years ago

By default, DCD will return declarations and autocompletes for the character just behind the cursor. This is expected behaviour for autocomplete however it is normal that when looking up declarations, you look up the symbol in front of the cursor. This (5 character) changes the lookup to be on the character ahead.

int foo(Bar bar) {
     ^ Old lookup requires cursor to be here
    ^ New lookup allows cursor to be here