| 4701 | } |
| 4702 | |
| 4703 | void UICodeEditor::registerCommands() { |
| 4704 | mDoc->setCommand( "move-to-previous-line", [this] { moveToPreviousLine(); } ); |
| 4705 | mDoc->setCommand( "move-to-next-line", [this] { moveToNextLine(); } ); |
| 4706 | mDoc->setCommand( "move-to-previous-page", [this] { moveToPreviousPage(); } ); |
| 4707 | mDoc->setCommand( "move-to-next-page", [this] { moveToNextPage(); } ); |
| 4708 | mDoc->setCommand( "move-to-start-of-line", []( Client* client ) { |
| 4709 | static_cast<UICodeEditor*>( client )->moveToStartOfLine(); |
| 4710 | } ); |
| 4711 | mDoc->setCommand( "move-to-end-of-line", []( Client* client ) { |
| 4712 | static_cast<UICodeEditor*>( client )->moveToEndOfLine(); |
| 4713 | } ); |
| 4714 | mDoc->setCommand( "move-to-start-of-content", []( Client* client ) { |
| 4715 | static_cast<UICodeEditor*>( client )->moveToStartOfContent(); |
| 4716 | } ); |
| 4717 | mDoc->setCommand( "select-to-previous-line", []( Client* client ) { |
| 4718 | static_cast<UICodeEditor*>( client )->selectToPreviousLine(); |
| 4719 | } ); |
| 4720 | mDoc->setCommand( "select-to-next-line", []( Client* client ) { |
| 4721 | static_cast<UICodeEditor*>( client )->selectToNextLine(); |
| 4722 | } ); |
| 4723 | mDoc->setCommand( "select-to-start-of-line", []( Client* client ) { |
| 4724 | static_cast<UICodeEditor*>( client )->selectToStartOfLine(); |
| 4725 | } ); |
| 4726 | mDoc->setCommand( "select-to-end-of-line", []( Client* client ) { |
| 4727 | static_cast<UICodeEditor*>( client )->selectToEndOfLine(); |
| 4728 | } ); |
| 4729 | mDoc->setCommand( "select-to-start-of-content", []( Client* client ) { |
| 4730 | static_cast<UICodeEditor*>( client )->selectToStartOfContent(); |
| 4731 | } ); |
| 4732 | mDoc->setCommand( "move-scroll-up", [this] { moveScrollUp(); } ); |
| 4733 | mDoc->setCommand( "move-scroll-down", [this] { moveScrollDown(); } ); |
| 4734 | mDoc->setCommand( "jump-lines-up", [this] { jumpLinesUp(); } ); |
| 4735 | mDoc->setCommand( "jump-lines-down", [this] { jumpLinesDown(); } ); |
| 4736 | mDoc->setCommand( "indent", [this] { indent(); } ); |
| 4737 | mDoc->setCommand( "unindent", [this] { unindent(); } ); |
| 4738 | mDoc->setCommand( "copy", [this] { copy(); } ); |
| 4739 | mDoc->setCommand( "cut", [this] { cut(); } ); |
| 4740 | mDoc->setCommand( "paste", [this] { paste(); } ); |
| 4741 | mDoc->setCommand( "font-size-grow", [this] { fontSizeGrow(); } ); |
| 4742 | mDoc->setCommand( "font-size-shrink", [this] { fontSizeShrink(); } ); |
| 4743 | mDoc->setCommand( "font-size-reset", [this] { fontSizeReset(); } ); |
| 4744 | mDoc->setCommand( "lock", [this] { setLocked( true ); } ); |
| 4745 | mDoc->setCommand( "unlock", [this] { setLocked( false ); } ); |
| 4746 | mDoc->setCommand( "lock-toggle", [this] { setLocked( !isLocked() ); } ); |
| 4747 | mDoc->setCommand( "open-containing-folder", [this] { openContainingFolder(); } ); |
| 4748 | mDoc->setCommand( "copy-containing-folder-path", [this] { copyContainingFolderPath(); } ); |
| 4749 | mDoc->setCommand( "copy-file-path", [this] { copyFilePath(); } ); |
| 4750 | mDoc->setCommand( "copy-file-path-and-position", [this] { copyFilePath( true ); } ); |
| 4751 | mDoc->setCommand( "find-replace", [this] { showFindReplace(); } ); |
| 4752 | mDoc->setCommand( "open-context-menu", [this] { createContextMenu(); } ); |
| 4753 | mDoc->setCommand( "add-cursor-at-mouse-position", []( Client* client ) { |
| 4754 | static_cast<UICodeEditor*>( client )->addCursorAtMousePosition(); |
| 4755 | } ); |
| 4756 | mDoc->setCommand( "add-cursors-from-current-to-mouse-position", []( Client* client ) { |
| 4757 | static_cast<UICodeEditor*>( client )->addCursorsFromCurrentToMousePosition(); |
| 4758 | } ); |
| 4759 | mDoc->setCommand( "toggle-fold", []( Client* client ) { |
| 4760 | static_cast<UICodeEditor*>( client )->toggleFoldUnfold(); |
nothing calls this directly
no test coverage detected