Skip to content

Commit

Permalink
Guard out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
electrikmilk committed May 23, 2024
1 parent 8d09a36 commit eff4a68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion copy_paste.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eff4a68

Please sign in to comment.