diff --git a/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePane.cs b/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePane.cs index 5ca1fbf3b3..2f49457ca5 100644 --- a/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePane.cs +++ b/Rubberduck.VBEditor.VB6/SafeComWrappers/VB/CodePane.cs @@ -46,7 +46,7 @@ private Selection GetSelection() endLine -= 1; using (var codeModule = CodeModule) { - endColumn = codeModule.GetLines(endLine, 1).Length; + endColumn = codeModule.GetLines(endLine, 1).Length + 1; } } diff --git a/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePane.cs b/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePane.cs index 04ce59c9fe..d63d661ee3 100644 --- a/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePane.cs +++ b/Rubberduck.VBEditor.VBA/SafeComWrappers/VB/CodePane.cs @@ -46,7 +46,7 @@ private Selection GetSelection() endLine -= 1; using (var codeModule = CodeModule) { - endColumn = codeModule.GetLines(endLine, 1).Length; + endColumn = codeModule.GetLines(endLine, 1).Length + 1; } }