mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 03:05:19 -04:00
Update CodeMirror to version 5.15.3
This commit is contained in:
parent
16d5e3ea80
commit
fb70833bc5
41 changed files with 834 additions and 310 deletions
22
public/vendor/codemirror/keymap/sublime.js
vendored
22
public/vendor/codemirror/keymap/sublime.js
vendored
|
@ -124,6 +124,7 @@
|
|||
}
|
||||
cm.setSelections(newSelection);
|
||||
});
|
||||
cm.execCommand("indentAuto");
|
||||
}
|
||||
|
||||
cmds[map[ctrl + "Enter"] = "insertLineAfter"] = function(cm) { return insertLine(cm, false); };
|
||||
|
@ -419,27 +420,6 @@
|
|||
|
||||
map[cK + ctrl + "Backspace"] = "delLineLeft";
|
||||
|
||||
cmds[map["Backspace"] = "smartBackspace"] = function(cm) {
|
||||
if (cm.somethingSelected()) return CodeMirror.Pass;
|
||||
|
||||
var cursor = cm.getCursor();
|
||||
var toStartOfLine = cm.getRange({line: cursor.line, ch: 0}, cursor);
|
||||
var column = CodeMirror.countColumn(toStartOfLine, null, cm.getOption("tabSize"));
|
||||
var indentUnit = cm.getOption("indentUnit");
|
||||
|
||||
if (toStartOfLine && !/\S/.test(toStartOfLine) && column % indentUnit == 0) {
|
||||
var prevIndent = new Pos(cursor.line,
|
||||
CodeMirror.findColumn(toStartOfLine, column - indentUnit, indentUnit));
|
||||
|
||||
// If no smart delete is happening (due to tab sizing) just do a regular delete
|
||||
if (prevIndent.ch == cursor.ch) return CodeMirror.Pass;
|
||||
|
||||
return cm.replaceRange("", prevIndent, cursor, "+delete");
|
||||
} else {
|
||||
return CodeMirror.Pass;
|
||||
}
|
||||
};
|
||||
|
||||
cmds[map[cK + ctrl + "K"] = "delLineRight"] = function(cm) {
|
||||
cm.operation(function() {
|
||||
var ranges = cm.listSelections();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue