MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / getOnPasteFn

Function getOnPasteFn

lib/web/CodeMirror/keymap/vim.js:391–402  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

389 }
390
391 function getOnPasteFn(cm) {
392 var vim = cm.state.vim;
393 if (!vim.onPasteFn) {
394 vim.onPasteFn = function() {
395 if (!vim.insertMode) {
396 cm.setCursor(offsetCursor(cm.getCursor(), 0, 1));
397 actions.enterInsertMode(cm, {}, vim);
398 }
399 };
400 }
401 return vim.onPasteFn;
402 }
403
404 var numberRegex = /[\d]/;
405 var wordCharTest = [CodeMirror.isWordChar, function(ch) {

Callers 2

enterVimModeFunction · 0.85
leaveVimModeFunction · 0.85

Calls 1

offsetCursorFunction · 0.70

Tested by

no test coverage detected