1
0
mirror of https://github.com/shadowfacts/type.git synced 2025-02-05 10:11:24 +00:00

Fix not being able to go to next chunk

This commit is contained in:
Shadowfacts 2016-10-01 17:21:00 -04:00
parent 5ddf1145f4
commit 0f9811d2c7
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5

View File

@ -159,7 +159,7 @@ function handleDelete(event) {
function handleEnter(event) {
let pos = editor.getCursor();
if (pos.line < editor.doc.size) {
if (pos.line < editor.doc.size - 1) {
let currentLine = editor.doc.getLine(pos.line);
let trimmed = currentLine.trim();
if (editor.getCursor().ch >= currentLine.indexOf(trimmed) + trimmed.length) {