Skip to content

Commit

Permalink
Allow default word selection when not using better selection
Browse files Browse the repository at this point in the history
Double-click in editor will just fall back to default word
selection when NOT using enhanced word selection.
  • Loading branch information
gorhill committed Dec 24, 2020
1 parent ab06a01 commit 596f085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/codemirror/ubo-static-filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 596f085

Please sign in to comment.