We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dc3ca9 commit ea0ac90Copy full SHA for ea0ac90
notebook/static/notebook/js/codecell.js
@@ -64,20 +64,14 @@ define([
64
} else {
65
// range is cursor
66
var line = cm.getLine(head.line).substring(0, head.ch);
67
- if( line.match(/^\ +$/) !== null){
+ if (line.match(/^\ +$/) !== null){
68
// delete tabs
69
var prevTabStop = (Math.ceil(head.ch/tabSize)-1)*tabSize;
70
- var from = {
71
- ch: prevTabStop,
72
- line: head.line
73
- };
+ var from = CodeMirror.Pos(head.line, prevTabStop)
74
cm.replaceRange("", from, head);
75
76
- // delete non-tabs
77
78
- ch: head.ch-1,
79
80
+ // delete normally
+ var from = cm.findPosH(head, -1, 'char', false);
81
82
}
83
0 commit comments