Fix up arrowing to top line always shifting right by one
This commit is contained in:
parent
5ed92b5ff4
commit
107a5370b1
@ -230,7 +230,7 @@ const gridToIndex = (str: string, x: number, y: number) => {
|
||||
if (y >= lines.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 = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user