summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-08 01:59:59 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-08 01:59:59 +0100
commit6576ac833209d8315c28f52e777a162f267ab6c7 (patch)
tree6e9873521ad0a9a8446989c1c96d0364f99d396f /Applications
parent77359a53606163ccc1cb889aa58ce28bf59eb3cc (diff)
downloadserenity-6576ac833209d8315c28f52e777a162f267ab6c7.zip
GTextEditor: Add selected_text() function.
I don't have a clipboard to actually put the copied selection onto yet, so just print the selected text to stdout so we can see what it is.
Diffstat (limited to 'Applications')
-rw-r--r--Applications/TextEditor/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Applications/TextEditor/main.cpp b/Applications/TextEditor/main.cpp
index 938613397a..84b474cf04 100644
--- a/Applications/TextEditor/main.cpp
+++ b/Applications/TextEditor/main.cpp
@@ -83,7 +83,7 @@ int main(int argc, char** argv)
});
auto copy_action = GAction::create("Copy", { Mod_Ctrl, Key_C }, GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/copyfile16.rgb", { 16, 16 }), [&] (const GAction&) {
- dbgprintf("FIXME: Implement Edit/Copy");
+ printf("Copy: \"%s\"\n", text_editor->selected_text().characters());
});
auto paste_action = GAction::create("Paste", { Mod_Ctrl, Key_V }, GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/paste16.rgb", { 16, 16 }), [&] (const GAction&) {