diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-08-03 00:14:34 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-08-03 00:14:34 +0900 |
commit | 15c49a3e084d758d3e475da27111732556deaecb (patch) | |
tree | 57e67f62cd52be6e28d2bfdeb49b7a938f4c4bac | |
parent | ae87f6548af27a293e4b00adc8b5c80fc88a4e92 (diff) |
Fix race condition
-rw-r--r-- | src/terminal.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/terminal.go b/src/terminal.go index 74c29a05..aca319a1 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -537,7 +537,8 @@ func (t *Terminal) printHighlighted(item *Item, bold bool, col1 int, col2 int, c } // Overflow - text := item.text + text := make([]rune, len(item.text)) + copy(text, item.text) offsets := item.colorOffsets(col2, bold, current) maxWidth := C.MaxX() - 3 - t.marginInt[1] - t.marginInt[3] fullWidth := displayWidth(text) |