Skip to content

Commit 9849b91

Browse files
author
sql-koala
committed
Merge branch 'master' of https://github.com/VSCodeVim/Vim into masterRepo
2 parents a156a21 + c3d11d8 commit 9849b91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3128
-1674
lines changed

CHANGELOG.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Change Log
22

3-
## [v1.20.2](https://github.com/vscodevim/vim/tree/v1.20.2) (2021-04-28)
3+
## [v1.20.3](https://github.com/vscodevim/vim/tree/v1.20.3) (2021-05-18)
4+
5+
[Full Changelog](https://github.com/vscodevim/vim/compare/v1.20.2...v1.20.3)
6+
7+
**Fixed Bugs:**
8+
9+
- . \(dot\) repeat last command mangles edit when used with completion [\#6610](https://github.com/VSCodeVim/Vim/issues/6610)
10+
- Scrolling commands `zb` and `zt` not working in visual mode [\#6578](https://github.com/VSCodeVim/Vim/issues/6578)
11+
- `\<` followed by `\<CR\>` in remap parsed incorrectly [\#6153](https://github.com/VSCodeVim/Vim/issues/6153)
12+
13+
## [v1.20.2](https://github.com/vscodevim/vim/tree/v1.20.2) (2021-04-30)
414

515
[Full Changelog](https://github.com/vscodevim/vim/compare/v1.20.1...v1.20.2)
616

@@ -38,10 +48,6 @@
3848
- `:y` yank command moves cursor [\#6519](https://github.com/VSCodeVim/Vim/issues/6519)
3949
- Failed to handle key=L. Cannot read property 'active' of undefined [\#6454](https://github.com/VSCodeVim/Vim/issues/6454)
4050

41-
**Merged pull requests:**
42-
43-
- Support 'set joinspaces' in join and reformat paragraph \(fix \#2505\) [\#5895](https://github.com/VSCodeVim/Vim/pull/5895) ([edemaine](https://github.com/edemaine))
44-
4551
## [v1.20.0](https://github.com/vscodevim/vim/tree/v1.20.0) (2021-04-17)
4652

4753
[Full Changelog](https://github.com/vscodevim/vim/compare/v1.19.3...v1.20.0)
@@ -96,7 +102,6 @@
96102
- Illegal value for `line` [\#6273](https://github.com/VSCodeVim/Vim/issues/6273)
97103
- Failed to handle key=d. Illegal value for `line` [\#6258](https://github.com/VSCodeVim/Vim/issues/6258)
98104
- Failed to handle key==. Illegal value for `line` [\#6178](https://github.com/VSCodeVim/Vim/issues/6178)
99-
- Failed to handle key=i. Illegal value for `line` [\#5909](https://github.com/VSCodeVim/Vim/issues/5909)
100105

101106
## [v1.19.1](https://github.com/vscodevim/vim/tree/v1.19.1) (2021-03-21)
102107

@@ -113,15 +118,13 @@
113118
**Enhancements:**
114119

115120
- goto command not implemented [\#6025](https://github.com/VSCodeVim/Vim/issues/6025)
116-
- Use source maps to get intelligible stack traces [\#5887](https://github.com/VSCodeVim/Vim/issues/5887)
117121

118122
**Fixed Bugs:**
119123

120124
- Tests fail silently on module loading problems. [\#6244](https://github.com/VSCodeVim/Vim/issues/6244)
121125
- `gi` should put cursor at start of file if there was no prior insertion [\#6189](https://github.com/VSCodeVim/Vim/issues/6189)
122126
- Issue while search text in Russian [\#6140](https://github.com/VSCodeVim/Vim/issues/6140)
123127
- `nnoremap`'ing `\<S-J\>` and `\<S-K\>` from .vimrc doesn't work [\#6110](https://github.com/VSCodeVim/Vim/issues/6110)
124-
- When Korean keyboard layout \(Hangul\) is active, Entering a space does not work properly. [\#5900](https://github.com/VSCodeVim/Vim/issues/5900)
125128

126129
**Closed issues:**
127130

@@ -160,17 +163,10 @@
160163
**Enhancements:**
161164

162165
- Implement `ZZ` and `ZQ` [\#5998](https://github.com/VSCodeVim/Vim/issues/5998)
163-
- Show Marks in Gutter [\#5924](https://github.com/VSCodeVim/Vim/pull/5924) ([zstix](https://github.com/zstix))
164166

165167
**Fixed Bugs:**
166168

167169
- Cannot read property 'warn' of undefined [\#5983](https://github.com/VSCodeVim/Vim/issues/5983)
168-
- H/M/L key not working in visual block mode [\#5890](https://github.com/VSCodeVim/Vim/issues/5890)
169-
170-
**Closed issues:**
171-
172-
- Unable to install vscode.vim extension is not compatible with current version vscode 1.51.1 [\#5883](https://github.com/VSCodeVim/Vim/issues/5883)
173-
- Failed to handle key=d. Cannot read property 'canBeRepeatedWithDot' of undefined [\#5879](https://github.com/VSCodeVim/Vim/issues/5879)
174170

175171
**Merged pull requests:**
176172

@@ -179,7 +175,6 @@
179175
- Fix 'cw' behavior on whitespace [\#6033](https://github.com/VSCodeVim/Vim/pull/6033) ([edemaine](https://github.com/edemaine))
180176
- Remove stray console.log statements [\#6032](https://github.com/VSCodeVim/Vim/pull/6032) ([edemaine](https://github.com/edemaine))
181177
- Document build/test process better [\#5946](https://github.com/VSCodeVim/Vim/pull/5946) ([edemaine](https://github.com/edemaine))
182-
- Fix gq to preserve blank lines like Vim does \(fix \#2393\) [\#5892](https://github.com/VSCodeVim/Vim/pull/5892) ([edemaine](https://github.com/edemaine))
183178

184179
## [v1.18.5](https://github.com/vscodevim/vim/tree/v1.18.5) (2020-12-10)
185180

gulpfile.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
var gulp = require('gulp'),
2-
bump = require('gulp-bump'),
3-
git = require('gulp-git'),
4-
sourcemaps = require('gulp-sourcemaps'),
5-
tag_version = require('gulp-tag-version'),
6-
tslint = require('gulp-tslint'),
7-
ts = require('gulp-typescript'),
8-
PluginError = require('plugin-error'),
9-
minimist = require('minimist'),
10-
path = require('path'),
11-
webpack = require('webpack'),
12-
webpack_stream = require('webpack-stream'),
13-
webpack_config = require('./webpack.config.js'),
14-
es = require('event-stream');
15-
webpack_dev_config = require('./webpack.dev.js');
16-
17-
const exec = require('child_process').exec;
18-
const spawn = require('child_process').spawn;
1+
const gulp = require('gulp');
2+
const bump = require('gulp-bump');
3+
const git = require('gulp-git');
4+
const sourcemaps = require('gulp-sourcemaps');
5+
const tag_version = require('gulp-tag-version');
6+
const tslint = require('gulp-tslint');
7+
const ts = require('gulp-typescript');
8+
const PluginError = require('plugin-error');
9+
const minimist = require('minimist');
10+
const path = require('path');
11+
const webpack = require('webpack');
12+
const webpack_stream = require('webpack-stream');
13+
const es = require('event-stream');
14+
15+
const webpack_config = require('./webpack.config.js');
16+
const webpack_dev_config = require('./webpack.dev.js');
17+
18+
const { exec, spawn } = require('child_process');
1919

2020
const releaseOptions = {
2121
semver: '',
@@ -200,7 +200,7 @@ gulp.task('webpack-dev', function () {
200200
return webpack_stream(
201201
{
202202
config: webpack_dev_config,
203-
entry: ['./extension.ts', './extensionWeb.ts'],
203+
entry: ['./extension.ts'],
204204
},
205205
webpack
206206
).pipe(gulp.dest('out'));

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Vim",
44
"description": "Vim emulation for Visual Studio Code",
55
"icon": "images/icon.png",
6-
"version": "1.20.2",
6+
"version": "1.20.3",
77
"publisher": "vscodevim",
88
"galleryBanner": {
99
"color": "#e3f4ff",
@@ -1132,15 +1132,15 @@
11321132
"@types/diff": "5.0.0",
11331133
"@types/diff-match-patch": "1.0.32",
11341134
"@types/glob": "7.1.3",
1135-
"@types/lodash": "4.14.169",
1135+
"@types/lodash": "4.14.170",
11361136
"@types/mocha": "8.2.2",
1137-
"@types/node": "12.20.13",
1138-
"@types/sinon": "10.0.0",
1137+
"@types/node": "12.20.14",
1138+
"@types/sinon": "10.0.2",
11391139
"@types/source-map-support": "0.5.3",
11401140
"@types/vscode": "1.42.0",
11411141
"clean-webpack-plugin": "3.0.0",
11421142
"event-stream": "4.0.1",
1143-
"fork-ts-checker-webpack-plugin": "6.2.8",
1143+
"fork-ts-checker-webpack-plugin": "6.2.10",
11441144
"gulp": "4.0.2",
11451145
"gulp-bump": "3.2.0",
11461146
"gulp-git": "2.10.1",
@@ -1152,13 +1152,13 @@
11521152
"mocha": "8.4.0",
11531153
"plugin-error": "1.0.1",
11541154
"prettier": "2.3.0",
1155-
"sinon": "10.0.0",
1156-
"ts-loader": "9.1.2",
1155+
"sinon": "11.1.1",
1156+
"ts-loader": "9.2.2",
11571157
"tslint": "6.1.3",
1158-
"typescript": "4.2.4",
1159-
"vsce": "1.88.0",
1158+
"typescript": "4.3.2",
1159+
"vsce": "1.91.0",
11601160
"vscode-test": "1.5.2",
1161-
"webpack": "5.37.0",
1161+
"webpack": "5.38.1",
11621162
"webpack-cli": "4.7.0",
11631163
"webpack-merge": "5.7.3",
11641164
"webpack-stream": "6.1.2"

src/actions/base.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Position } from 'vscode';
2-
import { Range } from '../common/motion/range';
2+
import { Cursor } from '../common/motion/cursor';
33
import { Notation } from '../configuration/notation';
44
import { isTextTransformation } from '../transformations/transformations';
55
import { configuration } from './../configuration/configuration';
@@ -21,6 +21,10 @@ export abstract class BaseAction {
2121
*/
2222
public isJump = false;
2323

24+
/**
25+
* TODO: This property is a lie - it pertains to whether an action creates an undo point...
26+
* See #5058 and rationalize ASAP.
27+
*/
2428
public canBeRepeatedWithDot = false;
2529

2630
/**
@@ -39,12 +43,12 @@ export abstract class BaseAction {
3943
/**
4044
* Modes that this action can be run in.
4145
*/
42-
public abstract modes: Mode[];
46+
public abstract readonly modes: readonly Mode[];
4347

4448
/**
4549
* The sequence of keys you use to trigger the action, or a list of such sequences.
4650
*/
47-
public keys: string[] | string[][];
51+
public abstract readonly keys: readonly string[] | readonly string[][];
4852

4953
public mustBeFirstKey = false;
5054

@@ -99,7 +103,10 @@ export abstract class BaseAction {
99103
return true;
100104
}
101105

102-
public static CompareKeypressSequence(one: string[] | string[][], two: string[]): boolean {
106+
public static CompareKeypressSequence(
107+
one: readonly string[] | readonly string[][],
108+
two: readonly string[]
109+
): boolean {
103110
if (BaseAction.is2DArray(one)) {
104111
for (const sequence of one) {
105112
if (BaseAction.CompareKeypressSequence(sequence, two)) {
@@ -166,7 +173,7 @@ export abstract class BaseAction {
166173
return this.keys.join('');
167174
}
168175

169-
private static is2DArray<T>(x: T[] | T[][]): x is T[][] {
176+
private static is2DArray<T>(x: readonly T[] | readonly T[][]): x is readonly T[][] {
170177
return Array.isArray(x[0]);
171178
}
172179
}
@@ -198,8 +205,6 @@ export abstract class BaseCommand extends BaseAction {
198205
*/
199206
runsOnceForEachCountPrefix = false;
200207

201-
canBeRepeatedWithDot = false;
202-
203208
/**
204209
* Run the command a single time.
205210
*/
@@ -227,10 +232,10 @@ export abstract class BaseCommand extends BaseAction {
227232
return;
228233
}
229234

230-
const resultingCursors: Range[] = [];
235+
const resultingCursors: Cursor[] = [];
231236

232237
const cursorsToIterateOver = vimState.cursors
233-
.map((x) => new Range(x.start, x.stop))
238+
.map((x) => new Cursor(x.start, x.stop))
234239
.sort((a, b) =>
235240
a.start.line > b.start.line ||
236241
(a.start.line === b.start.line && a.start.character > b.start.character)
@@ -249,7 +254,7 @@ export abstract class BaseCommand extends BaseAction {
249254
await this.exec(stop, vimState);
250255
}
251256

252-
resultingCursors.push(new Range(vimState.cursorStartPosition, vimState.cursorStopPosition));
257+
resultingCursors.push(new Cursor(vimState.cursorStartPosition, vimState.cursorStopPosition));
253258

254259
for (const transformation of vimState.recordedState.transformer.transformations) {
255260
if (isTextTransformation(transformation) && transformation.cursorIndex === undefined) {

0 commit comments

Comments
 (0)