diff options
Diffstat (limited to 'src/Lang/Cpp/CppDocGen.ts')
| -rw-r--r-- | src/Lang/Cpp/CppDocGen.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Lang/Cpp/CppDocGen.ts b/src/Lang/Cpp/CppDocGen.ts index a7994eb..b825570 100644 --- a/src/Lang/Cpp/CppDocGen.ts +++ b/src/Lang/Cpp/CppDocGen.ts @@ -311,8 +311,8 @@ export class CppDocGen implements IDocGen { line = baseLine; character = baseCharacter; } - - const from: Position = new Position(line, character - this.smartTextLength - 1); + const start = character - this.smartTextLength - 1; + const from: Position = new Position(line, (start > 0 ? start : 0)); const to: Position = new Position(line, character); this.activeEditor.selection = new Selection(from, to); } |