Skip to content

Commit c3d2246

Browse files
Dominator008marijnh
authored andcommitted
[vim bindings] Remove dead code and initialize a property
The Error after the while(true) loop is not reachable and should be removed. The "this.iterator" property should be given an initial value of 0. This fixes two warnings reported by Closure Compiler.
1 parent 98f2ce5 commit c3d2246

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

keymap/vim.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@
10481048
};
10491049
function HistoryController() {
10501050
this.historyBuffer = [];
1051-
this.iterator;
1051+
this.iterator = 0;
10521052
this.initialPrefix = null;
10531053
}
10541054
HistoryController.prototype = {
@@ -3290,8 +3290,6 @@
32903290
line = cm.getLine(lineNum);
32913291
pos = (dir > 0) ? 0 : line.length;
32923292
}
3293-
// Should never get here.
3294-
throw new Error('The impossible happened.');
32953293
}
32963294

32973295
/**

0 commit comments

Comments
 (0)