diff --git a/copy_paste.go b/copy_paste.go index f343f56..7ba72f6 100644 --- a/copy_paste.go +++ b/copy_paste.go @@ -66,7 +66,9 @@ func pasteCopy() { if EOL() { idx-- lineIdx-- - lineCharIdx = len(lines[lineIdx]) + if len(lines) < lineIdx { + lineCharIdx = len(lines[lineIdx]) + } } if contents, found := pasteables[identifier]; found { lines[lineIdx] = contents