##// END OF EJS Templates
Fixing delete_count logic.
Brian E. Granger -
Show More
@@ -267,17 +267,15 b' var IPython = (function (IPython) {'
267 'd' : {
267 'd' : {
268 help : 'delete cell (press twice)',
268 help : 'delete cell (press twice)',
269 handler : function (event) {
269 handler : function (event) {
270 var dc = IPython.delete_count;
270 var dc = IPython.keyboard_manager._delete_count;
271 if (dc === undefined) {
271 if (dc === 0) {
272 IPython.delete_count = 1;
272 IPython.keyboard_manager._delete_count = 1;
273 } else if (dc === 0) {
274 IPython.delete_count = 1;
275 setTimeout(function () {
273 setTimeout(function () {
276 IPython.delete_count = 0;
274 IPython.keyboard_manager._delete_count = 0;
277 }, 800);
275 }, 800);
278 } else if (dc === 1) {
276 } else if (dc === 1) {
279 IPython.notebook.delete_cell();
277 IPython.notebook.delete_cell();
280 IPython.delete_count = 0;
278 IPython.keyboard_manager._delete_count = 0;
281 }
279 }
282 return false;
280 return false;
283 }
281 }
@@ -525,7 +523,7 b' var IPython = (function (IPython) {'
525 var KeyboardManager = function () {
523 var KeyboardManager = function () {
526 this.mode = 'command';
524 this.mode = 'command';
527 this.enabled = true;
525 this.enabled = true;
528 this.delete_count = 0;
526 this._delete_count = 0;
529 this.bind_events();
527 this.bind_events();
530 this.command_shortcuts = new ShortcutManager();
528 this.command_shortcuts = new ShortcutManager();
531 this.command_shortcuts.add_shortcuts(default_common_shortcuts);
529 this.command_shortcuts.add_shortcuts(default_common_shortcuts);
General Comments 0
You need to be logged in to leave comments. Login now