have shift-m merge below if one cell selected

pull/822/head
Matthias Bussonnier 11 years ago
parent 2faaae8d54
commit e7912c4682

@ -380,13 +380,25 @@ define(function(require){
env.notebook.merge_cell_below();
}
},
'merge-cells' : {
'merge-selected-cells' : {
help : 'merge selected cells',
help_index: 'el',
handler: function(env) {
env.notebook.merge_selected_cells();
}
},
'merge-cells' : {
help : 'merge selected cells, or current cell with cell below if only one cell selected',
help_index: 'el',
handler: function(env) {
var l = env.notebook.get_selected_cells_indices().length
if(l == 1){
env.notebook.merge_cell_below();
} else {
env.notebook.merge_selected_cells();
}
}
},
'show-command-palette': {
help_index : 'aa',
help: 'open the command palette',

Loading…
Cancel
Save