diff --git a/python/ycm/tests/command_test.py b/python/ycm/tests/command_test.py index 52ce46703..274697173 100644 --- a/python/ycm/tests/command_test.py +++ b/python/ycm/tests/command_test.py @@ -99,7 +99,7 @@ def test_SendCommandRequest_BuildRange_NoVisualMarks( self, ycm, *args ): }, 'end': { 'line_num': 2, - 'column_num': 12 + 'column_num': 13 } } }, @@ -132,7 +132,7 @@ def test_SendCommandRequest_BuildRange_VisualMarks( self, ycm, *args ): }, 'end': { 'line_num': 2, - 'column_num': 9 + 'column_num': 10 } } }, diff --git a/python/ycm/vimsupport.py b/python/ycm/vimsupport.py index 2a29b1ede..c7a192dcf 100644 --- a/python/ycm/vimsupport.py +++ b/python/ycm/vimsupport.py @@ -1400,7 +1400,7 @@ def BuildRange( start_line, end_line ): # Vim returns the maximum 32-bit integer value when a whole line is # selected. Use the end of line instead. 'column_num': min( end[ 1 ], - len( vim.current.buffer[ end[ 0 ] - 1 ] ) ) + 1 + len( vim.current.buffer[ end[ 0 ] - 1 ] ) ) + 2 } } }