From 3a6ae86fb67b4548334623180a25dce1ba9d82a9 Mon Sep 17 00:00:00 2001 From: Matt Furden Date: Tue, 29 Nov 2022 23:49:53 -0800 Subject: [PATCH] Remove `firstRowIsWhiteSpace` - unused and breaks empty lines The result of this value isn't used but it often fails when clicking on empty lines, resulting in gaps of highlighted text when there are new lines present. Removing this line fixes this issue and removes an unused variable. --- webview/src/code.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/webview/src/code.js b/webview/src/code.js index d14dbcb..d180391 100644 --- a/webview/src/code.js +++ b/webview/src/code.js @@ -19,8 +19,6 @@ const setupLines = (node, config) => { // lineNumber click event lineNum.onclick = function (e) { - var firstRowIsWhiteSpace = this.nextSibling.firstChild.firstChild.innerText.trim() === ""; - if(this.parentNode.classList.contains("line-focus")) { this.parentNode.classList.remove("line-focus");