From c97cf8851f282e4b7bfbeafb9223afeb9af336d6 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke <marijn@haverbeke.nl> Date: Mon, 10 Jul 2017 21:45:42 +0200 Subject: [PATCH] Use cursorCoords in goLineLeftSmart command Closes #4840 --- src/edit/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/edit/commands.js b/src/edit/commands.js index 45ae5eb0..eda54bcd 100644 --- a/src/edit/commands.js +++ b/src/edit/commands.js @@ -67,7 +67,7 @@ export let commands = { return cm.coordsChar({left: 0, top: top}, "div") }, sel_move), goLineLeftSmart: cm => cm.extendSelectionsBy(range => { - let top = cm.charCoords(range.head, "div").top + 5 + let top = cm.cursor(range.head, "div").top + 5 let pos = cm.coordsChar({left: 0, top: top}, "div") if (pos.ch < cm.getLine(pos.line).search(/\S/)) return lineStartSmart(cm, range.head) return pos -- GitLab