|
@@ -1399,18 +1399,8 @@ namespace Private {
|
|
|
doc.replaceRange('', from, head);
|
|
|
} else {
|
|
|
// delete non-tabs
|
|
|
- if (head.ch === 0) {
|
|
|
- if (head.line !== 0) {
|
|
|
- const from = CodeMirror.Pos(
|
|
|
- head.line - 1,
|
|
|
- doc.getLine(head.line - 1).length
|
|
|
- );
|
|
|
- doc.replaceRange('', from, head);
|
|
|
- }
|
|
|
- } else {
|
|
|
- const from = CodeMirror.Pos(head.line, head.ch - 1);
|
|
|
- doc.replaceRange('', from, head);
|
|
|
- }
|
|
|
+ const from = cm.findPosH(head, -1, 'char', false);
|
|
|
+ doc.replaceRange('', from, head);
|
|
|
}
|
|
|
}
|
|
|
}
|