CodeMirror update leftovers

This commit is contained in:
tophf 2021-01-23 10:13:02 +03:00
parent 8cabf8a8aa
commit 2c9ea4fdc0

View File

@ -737,7 +737,7 @@
// TODO: Convert keymap into dictionary format for fast lookup. // TODO: Convert keymap into dictionary format for fast lookup.
}, },
// Testing hook, though it might be useful to expose the register // Testing hook, though it might be useful to expose the register
// controller anyways. // controller anyway.
getRegisterController: function() { getRegisterController: function() {
return vimGlobalState.registerController; return vimGlobalState.registerController;
}, },
@ -3483,7 +3483,7 @@
}, },
isComplete: function(state) { isComplete: function(state) {
if (state.nextCh === '#') { if (state.nextCh === '#') {
var token = state.lineText.match(/#(\w+)/)[1]; var token = state.lineText.match(/^#(\w+)/)[1];
if (token === 'endif') { if (token === 'endif') {
if (state.forward && state.depth === 0) { if (state.forward && state.depth === 0) {
return true; return true;
@ -4322,7 +4322,7 @@
raw += ' <span style="color: #888">' + desc + '</span>'; raw += ' <span style="color: #888">' + desc + '</span>';
return raw; return raw;
} }
var searchPromptDesc = '(Javascript regexp)'; var searchPromptDesc = '(JavaScript regexp)';
function showPrompt(cm, options) { function showPrompt(cm, options) {
var shortText = (options.prefix || '') + ' ' + (options.desc || ''); var shortText = (options.prefix || '') + ' ' + (options.desc || '');
var prompt = makePrompt(options.prefix, options.desc); var prompt = makePrompt(options.prefix, options.desc);
@ -5234,7 +5234,7 @@
* @param {Cursor} lineEnd Line to stop replacing at. * @param {Cursor} lineEnd Line to stop replacing at.
* @param {RegExp} query Query for performing matches with. * @param {RegExp} query Query for performing matches with.
* @param {string} replaceWith Text to replace matches with. May contain $1, * @param {string} replaceWith Text to replace matches with. May contain $1,
* $2, etc for replacing captured groups using Javascript replace. * $2, etc for replacing captured groups using JavaScript replace.
* @param {function()} callback A callback for when the replace is done. * @param {function()} callback A callback for when the replace is done.
*/ */
function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query, function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query,