Skip to content

Commit

Permalink
Fixes toggling comment when caret at the beginning of a line
Browse files Browse the repository at this point in the history
  • Loading branch information
bergfi committed Jul 20, 2017
1 parent a7b46e0 commit 3379ca2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LiteEditor/cl_editor.cpp
Expand Up @@ -5214,9 +5214,9 @@ void LEditor::ToggleLineComment(const wxString& commentSymbol, int commentStyle)
int lineEnd = LineFromPosition(end);

// Check if the "end" position is at the start of a line, in that case, don't
// include it
// include it. Only do this in case of a selection.
int endLineStartPos = PositionFromLine(lineEnd);
if(endLineStartPos == end) {
if(lineStart < lineEnd && endLineStartPos == end) {
--lineEnd;
}

Expand Down

0 comments on commit 3379ca2

Please sign in to comment.