Fix select word on wide characters

This commit is contained in:
Daniel Imms
2017-09-30 08:30:19 -04:00
parent 4828c4a6fa
commit 58259f8bd9
2 changed files with 12 additions and 7 deletions
+2 -2
View File
@@ -228,10 +228,10 @@ export class Buffer implements IBuffer {
// column indexes
if (char[CHAR_DATA_WIDTH_INDEX] === 0) {
if (startCol >= i) {
startIndex -= char[CHAR_DATA_CHAR_INDEX].length;
startIndex--;
}
if (endCol >= i) {
endIndex -= char[CHAR_DATA_CHAR_INDEX].length;
endIndex--;
}
} else {
// Adjust the columns to take glyphs that are represented by multiple