diff options
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -70,6 +70,7 @@ static CommandName command_names[] = { {"autocomplete", CMD_AUTOCOMPLETE}, {"autocomplete-back", CMD_AUTOCOMPLETE_BACK}, {"find-usages", CMD_FIND_USAGES}, + {"copy-path", CMD_COPY_PATH}, {"goto-definition", CMD_GOTO_DEFINITION}, {"goto-definition-at-cursor", CMD_GOTO_DEFINITION_AT_CURSOR}, {"goto-declaration-at-cursor", CMD_GOTO_DECLARATION_AT_CURSOR}, @@ -304,6 +305,13 @@ void command_execute_ex(Ted *ted, Command c, CommandArgument full_argument, Comm } } break; + case CMD_COPY_PATH: + if (buffer) { + SDL_SetClipboardText(buffer->path); + } else { + SDL_SetClipboardText(ted->cwd); + } + break; case CMD_TAB: if (ted->replace && buffer == &ted->find_buffer) { ted_switch_to_buffer(ted, &ted->replace_buffer); |