Fix up arrowing to top line always shifting right by one
This commit is contained in:
@ -230,7 +230,7 @@ const gridToIndex = (str: string, x: number, y: number) => {
|
|||||||
if (y >= lines.length) {
|
if (y >= lines.length) {
|
||||||
return str.length;
|
return str.length;
|
||||||
}
|
}
|
||||||
return lines.slice(0, y).join("\n").length+Math.min(x, lines[y].length)+1;
|
return lines.slice(0, y).join("\n").length+Math.min(x, lines[y].length)+(y === 0 ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const keywords = [
|
const keywords = [
|
||||||
|
Reference in New Issue
Block a user