MCPcopy
hub / github.com/philc/vimium / exit

Method exit

content_scripts/mode.js:234–255  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

232 }
233
234 exit(...args) {
235 if (this.modeIsExiting || !this.modeIsActive) {
236 return;
237 }
238
239 this.log("deactivate:", this.id);
240 this.modeIsExiting = true;
241
242 for (const handler of this.exitHandlers) {
243 // TODO(philc): Is this array.from necessary?
244 handler(...Array.from(args || []));
245 }
246
247 for (const handlerId of this.handlers) {
248 handlerStack.remove(handlerId);
249 }
250
251 Mode.modes = Mode.modes.filter((mode) => mode !== this);
252
253 this.modeIsActive = false;
254 return this.setIndicator();
255 }
256
257 // Debugging routines.
258 logModes() {

Callers 15

initMethod · 0.95
resetMethod · 0.45
initMethod · 0.45
yankMethod · 0.45
"/"Function · 0.45
initMethod · 0.45
prepareToActivateModeFunction · 0.45
activateModeFunction · 0.45
onKeyDownInModeMethod · 0.45
deactivateModeMethod · 0.45
constructorMethod · 0.45
resetExitTimerMethod · 0.45

Calls 4

logMethod · 0.95
setIndicatorMethod · 0.95
removeMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected