(selectIfNull)
| 578 | } |
| 579 | }, |
| 580 | async format(selectIfNull) { |
| 581 | const { editor } = editorManager; |
| 582 | const pos = editor.getCursorPosition(); |
| 583 | |
| 584 | const didFormat = await acode.format(selectIfNull); |
| 585 | if (didFormat) { |
| 586 | // Restore cursor position after formatting (pos.row is now 1-based) |
| 587 | editor.gotoLine(pos.row, pos.column); |
| 588 | } |
| 589 | }, |
| 590 | async eol() { |
| 591 | const eol = await select(strings["new line mode"], ["unix", "windows"], { |
| 592 | default: editorManager.activeFile.eol, |