Browse Source

Update show offset command

pull/1800/head
Artur Arseniev 7 years ago
parent
commit
51fecb182b
  1. 10
      src/commands/index.js
  2. 1
      src/commands/view/ShowOffset.js

10
src/commands/index.js

@ -349,11 +349,10 @@ module.exports = () => {
const editor = em.get('Editor');
if (!this.isActive(id)) {
result = command.callRun(editor, options);
if (id && command.stop && !command.noStop) {
active[id] = result;
}
result = command.callRun(editor, options);
}
}
@ -373,8 +372,11 @@ module.exports = () => {
if (command && command.run) {
const id = command.id;
const editor = em.get('Editor');
result = command.callStop(editor, options);
if (id) delete active[id];
if (this.isActive(id)) {
if (id) delete active[id];
result = command.callStop(editor, options);
}
}
return result;

1
src/commands/view/ShowOffset.js

@ -17,6 +17,7 @@ module.exports = {
!config.showOffsets ||
(!config.showOffsetsSelected && state == 'Fixed')
) {
editor.stopCommand(this.id, opts);
return;
}

Loading…
Cancel
Save