The use of nested Promises here hurt my head when trying to accommodate a breaking change in typescript 4.1, so I'm just sorting this out for myself before doing the typescript upgrade.
This means `vimState.editor` should never be undefined - now we should start using that instead of `vscode.window.activeTextEditor` to avoid a whole bunch of pesky race conditions.
Refs #5663
This is a pretty massive change; see pull request #4735 for full details
Most notably:
- Support for operator-pending mode, including remaps and a half-cursor decoration
- Correct handling of ambiguous remaps with timeout
- Correct handling of recursive special case when the RHS starts with the LHS
- Correct handling of multi-key remaps in insert mode
- Failed movements that occur partway through a remap stop & discard the rest of the remap
- Implement `unmap` and `mapclear` in .vimrc
Refs #463, refs #4908Fixes#1261, fixes#1398, fixes#1579, fixes#1821, fixes#1835Fixes#1870, fixes#1883, fixes#2041, fixes#2234, fixes#2466Fixes#2897, fixes#2955, fixes#2975, fixes#3082, fixes#3086Fixes#3171, fixes#3373, fixes#3413, fixes#3742, fixes#3768Fixes#3988, fixes#4057, fixes#4118, fixes#4236, fixes#4353Fixes#4464, fixes#4530, fixes#4532, fixes#4563, fixes#4674Fixes#4756, fixes#4883, fixes#4928, fixes#4991, fixes#5016Fixes#5057, fixes#5067, fixes#5084, fixes#5125
This makes testing different setting combinations MUCH easier.
Settings coverage is very much lacking in our test suite, which we should definitely make an effort to improve. More sane test organization and automated code coverage detection would make our gaps more obvious.
I thought my last commit was innocuous, but that's always a dangerous attitude to have :)
`Position.withColumn()` now does bounds checking, which the test framework wasn't too happy about
No functional changes here, just migrating some old tests to the `newTest` framework, enhanced that framework to check status bar, improved some test names, etc.
This is a step toward fixing our janky status bar logic. Basically, I want to make information about the current mode easily available from a VimState without needing the ModeHandler.
The Mode class has been destroyed, replaced by some functions that take a ModeName.
More refactoring could be done, I'm sure, but I think this is a BIG step in the right directions.
I'd love to enable `prefer-const` in tslint, but with 17 pull requests outstanding, I think it might cause some merge conflicts. Making the switch in test/** is a step toward that goal which should result in essentially no conflicts.
* Fix tokenizeKeySequence to allow left shift operator in keysPressed.
* Tests for #2299 and other left and right shift operations.
* Fix#2299 left shift operator off by one bug
* Fix tokenizeKeySequence bug introduced by handling left shift.
* Make rawTokenize clearer.