Change:
test('in-word ranges', async () => { await assertRanges(new WordSelectionRangeProvider(), 'f|ooBar', <del> new Range(1, 1, 1, 5), // foo new Range(1, 1, 1, 8), // fooBar new Range(1, 1, 1, 8), // doc </del> <ins> new Range(1, 1, 1, 4), // foo new Range(1, 1, 1, 7), // fooBar new Range(1, 1, 1, 7), // doc </ins> ); await assertRanges(new WordSelectionRangeProvider(), 'f|oo_Ba', <del> new Range(1, 1, 1, 5), new Range(1, 1, 1, 8), new Range(1, 1, 1, 8), </del> <ins> new Range(1, 1, 1, 4), new Range(1, 1, 1, 7), new Range(1, 1, 1, 7), </ins> ); await assertRanges(new WordSelectionRangeProvider(), 'f|oo-Ba', <del> new Range(1, 1, 1, 5), new Range(1, 1, 1, 8), new Range(1, 1, 1, 8), </del> <ins> new Range(1, 1, 1, 4), new Range(1, 1, 1, 7), new Range(1, 1, 1, 7), </ins> ); }); test('Default selection should select current word/hump first in camelCase #67493', async function () { await assertRanges(new WordSelectionRangeProvider(), 'Abs|tractSmartSelect', <del> new Range(1, 1, 1, 10), new Range(1, 1, 1, 21), new Range(1, 1, 1, 21), </del> <ins> new Range(1, 1, 1, 9), new Range(1, 1, 1, 20), new Range(1, 1, 1, 20), </ins> ); await assertRanges(new WordSelectionRangeProvider(), 'AbstractSma|rtSelect', <del> new Range(1, 9, 1, 15), new Range(1, 1, 1, 21), new Range(1, 1, 1, 21), </del> <ins> new Range(1, 9, 1, 14), new Range(1, 1, 1, 20), new Range(1, 1, 1, 20), </ins> ); await assertRanges(new WordSelectionRangeProvider(), 'Abstrac-Sma|rt-elect', <del> new Range(1, 9, 1, 15), new Range(1, 1, 1, 21), new Range(1, 1, 1, 21), </del> <ins> new Range(1, 9, 1, 14), new Range(1, 1, 1, 20), new Range(1, 1, 1, 20), </ins> ); await assertRanges(new WordSelectionRangeProvider(), 'Abstrac_Sma|rt_elect', <del> new Range(1, 9, 1, 15), new Range(1, 1, 1, 21), new Range(1, 1, 1, 21), </del> <ins> new Range(1, 9, 1, 14), new Range(1, 1, 1, 20), new Range(1, 1, 1, 20), </ins> ); await assertRanges(new WordSelectionRangeProvider(), 'Abstrac_Sma|rt-elect', <del> new Range(1, 9, 1, 15), new Range(1, 1, 1, 21), new Range(1, 1, 1, 21), </del> <ins> new Range(1, 9, 1, 14), new Range(1, 1, 1, 20), new Range(1, 1, 1, 20), </ins> ); await assertRanges(new WordSelectionRangeProvider(), 'Abstrac_Sma|rtSelect', <del> new Range(1, 9, 1, 15), new Range(1, 1, 1, 21), new Range(1, 1, 1, 21), </del> <ins> new Range(1, 9, 1, 14), new Range(1, 1, 1, 20), new Range(1, 1, 1, 20), </ins> ); });

Discussion:
Issue Type: <bBug</bany file which contains word consisting of letters with underscores (f.e. helloworld). For simplicity let's assume only one underscore is present. cursor in various places of this word and activate expand selection command (either via keyboard shortcut or keybinding) : 3a. cursor is not near underscore (underscore is not immediately to the left or right of cursor) - part of the word selected, bounded by word beginning/end and underscore - OK 3b. underscore is immediately left to the cursor - part of word to the right of cursor is selected - OK 3c. underscore is immediately right to the cursor - the whole word is selected - UNEXPECTED. For 3c I expected only part of the word selected as well, not the whole word. VS Code version: Code 1.42.0 (, 2020-02-06T10:51:34.058Z) OS version: WindowsNT x64 10.0. <details<summarySystem Info</summary </details<details<summaryExtensions (10)</summaryExtensionVersion ------ quick-open-prefill-selection0.0.1 vscode-eslint2.0.15 gitlens10.2.1 EditorConfig0.14.4 vscode-great-icons2.1.47 intellij-idea-keybindings0.2.37 camelcasenavigation1.1.1 material-icon-theme3.9.3 partial-diff1.4.1 terminal-tabs0.2.0 (5 theme extensions excluded) </details<!-- generated by issue reporter --
Tried to fix this in the PR PS - this is my first PR for a OSS, ever... please forgive me for any mistake or misconduct.