emacs: cleanup
This commit is contained in:
parent
24f3bab19d
commit
b966cfd7da
1 changed files with 3 additions and 3 deletions
|
|
@ -442,7 +442,7 @@ exports.handler.addCommands({
|
|||
// Any insertion or mouse click resets mark-mode.
|
||||
// setMark twice in a row at the same place resets markmode.
|
||||
// in multi select mode, ea selection is handled individually
|
||||
|
||||
|
||||
if (args && args.count) {
|
||||
function moveToMark() {
|
||||
var mark = editor.popEmacsMark();
|
||||
|
|
@ -452,7 +452,7 @@ exports.handler.addCommands({
|
|||
else moveToMark();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var mark = editor.emacsMark(),
|
||||
ranges = editor.selection.getAllRanges(),
|
||||
rangePositions = ranges.map(function(r) { return {row: r.start.row, column: r.start.column}; }),
|
||||
|
|
@ -467,7 +467,7 @@ exports.handler.addCommands({
|
|||
if (mark) editor.pushEmacsMark(null);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!mark) {
|
||||
rangePositions.slice(0,-1).forEach(function(pos) { editor.pushEmacsMark(pos); });
|
||||
editor.setEmacsMark(rangePositions[rangePositions.length-1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue