From 596f085fa55e4d3ed343da9ebe57f31ddb6835be Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 24 Dec 2020 08:34:45 -0500 Subject: [PATCH] Allow default word selection when not using better selection Double-click in editor will just fall back to default word selection when NOT using enhanced word selection. --- src/js/codemirror/ubo-static-filtering.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/codemirror/ubo-static-filtering.js b/src/js/codemirror/ubo-static-filtering.js index b7d329521..f4f07f5ce 100644 --- a/src/js/codemirror/ubo-static-filtering.js +++ b/src/js/codemirror/ubo-static-filtering.js @@ -720,7 +720,7 @@ CodeMirror.registerHelper('fold', 'ubo-static-filtering', (( ) => { end = ch + r[0].length; } } else if ( /\bvariable\b/.test(token) ) { - const l = /[#.]?[a-z0-9_-]+$/i.exec(s.slice(0, ch)); + const l = /[#.][a-z0-9_-]+$/i.exec(s.slice(0, ch)); const r = /^[a-z0-9_-]+/i.exec(s.slice(ch)); if ( l && r ) { beg = l.index;