Skip to content

Commit

Permalink
Fix for truncating last character from selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
velyan committed Oct 25, 2016
1 parent 5601f36 commit ae0454b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MarkExtension/MarkParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class MarkParser {
for line in startLine...endLine {
let lineString = (buffer.lines.count > line) ? buffer.lines[line] as! NSString : ""
let rangeStart = (line == startLine) ? range.start.column : 0
let rangeEnd = (line == endLine) ? range.end.column : lineString.length
let rangeEnd = (line == endLine) ? range.end.column + 1 : lineString.length
selectionString.append(lineString.substring(with: NSMakeRange(rangeStart, rangeEnd - rangeStart)))
}

Expand Down

0 comments on commit ae0454b

Please sign in to comment.