Skip to content
Snippets Groups Projects
Commit 6892031f authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

Use cursorCoords in goLineLeft/goLineRight

Issue #4840
parent d444cd10
No related branches found
No related tags found
Loading
...@@ -59,11 +59,11 @@ export let commands = { ...@@ -59,11 +59,11 @@ export let commands = {
{origin: "+move", bias: -1} {origin: "+move", bias: -1}
), ),
goLineRight: cm => cm.extendSelectionsBy(range => { goLineRight: cm => cm.extendSelectionsBy(range => {
let top = cm.charCoords(range.head, "div").top + 5 let top = cm.cursorCoords(range.head, "div").top + 5
return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div") return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")
}, sel_move), }, sel_move),
goLineLeft: cm => cm.extendSelectionsBy(range => { goLineLeft: cm => cm.extendSelectionsBy(range => {
let top = cm.charCoords(range.head, "div").top + 5 let top = cm.cursorCoords(range.head, "div").top + 5
return cm.coordsChar({left: 0, top: top}, "div") return cm.coordsChar({left: 0, top: top}, "div")
}, sel_move), }, sel_move),
goLineLeftSmart: cm => cm.extendSelectionsBy(range => { goLineLeftSmart: cm => cm.extendSelectionsBy(range => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment