Index: uspace/app/edit/edit.c
===================================================================
--- uspace/app/edit/edit.c	(revision 8e253ac57c7b77b12475a4f7112edce75b62897d)
+++ uspace/app/edit/edit.c	(revision b4b5f6a410c74cf5ada583ec4de895863a65aac6)
@@ -61,4 +61,5 @@
 #include <ui/menubar.h>
 #include <ui/menuentry.h>
+#include <ui/promptdialog.h>
 #include <ui/resource.h>
 #include <ui/ui.h>
@@ -268,4 +269,13 @@
 };
 
+static void go_to_line_dialog_bok(ui_prompt_dialog_t *, void *, const char *);
+static void go_to_line_dialog_bcancel(ui_prompt_dialog_t *, void *);
+static void go_to_line_dialog_close(ui_prompt_dialog_t *, void *);
+
+static ui_prompt_dialog_cb_t go_to_line_dialog_cb = {
+	.bok = go_to_line_dialog_bok,
+	.bcancel = go_to_line_dialog_bcancel,
+	.close =  go_to_line_dialog_close
+};
 
 int main(int argc, char *argv[])
@@ -1045,5 +1055,4 @@
 	return EOK;
 }
-
 
 /** Display pane text.
@@ -1609,22 +1618,19 @@
 static void caret_go_to_line_ask(void)
 {
-	char *sline;
-
-	sline = prompt("Go to line", "");
-	if (sline == NULL) {
-		status_display("Go to line cancelled.");
+	ui_prompt_dialog_params_t pdparams;
+	ui_prompt_dialog_t *dialog;
+	errno_t rc;
+
+	ui_prompt_dialog_params_init(&pdparams);
+	pdparams.caption = "Go To Line";
+	pdparams.prompt = "Line Number";
+
+	rc = ui_prompt_dialog_create(edit.ui, &pdparams, &dialog);
+	if (rc != EOK) {
+		printf("Error creating prompt dialog.\n");
 		return;
 	}
 
-	char *endptr;
-	int line = strtol(sline, &endptr, 10);
-	if (*endptr != '\0') {
-		free(sline);
-		status_display("Invalid number entered.");
-		return;
-	}
-	free(sline);
-
-	caret_move_absolute(line, pane.ideal_column, dir_before, false);
+	ui_prompt_dialog_set_cb(dialog, &go_to_line_dialog_cb, &edit);
 }
 
@@ -2131,8 +2137,14 @@
     const char *fname)
 {
+	edit_t *edit = (edit_t *)arg;
+	gfx_context_t *gc = ui_window_get_gc(edit->window);
 	char *cname;
 	errno_t rc;
 
 	ui_file_dialog_destroy(dialog);
+	// TODO Smarter cursor management
+	pane.rflags |= REDRAW_CARET;
+	(void) pane_update(&pane);
+	gfx_cursor_set_visible(gc, true);
 
 	cname = str_dup(fname);
@@ -2160,7 +2172,11 @@
 {
 	edit_t *edit = (edit_t *)arg;
-
-	(void)edit;
+	gfx_context_t *gc = ui_window_get_gc(edit->window);
+
 	ui_file_dialog_destroy(dialog);
+	// TODO Smarter cursor management
+	pane.rflags |= REDRAW_CARET;
+	(void) pane_update(&pane);
+	gfx_cursor_set_visible(gc, true);
 }
 
@@ -2173,7 +2189,73 @@
 {
 	edit_t *edit = (edit_t *)arg;
-
-	(void)edit;
+	gfx_context_t *gc = ui_window_get_gc(edit->window);
+
 	ui_file_dialog_destroy(dialog);
+	// TODO Smarter cursor management
+	pane.rflags |= REDRAW_CARET;
+	(void) pane_update(&pane);
+	gfx_cursor_set_visible(gc, true);
+}
+
+/** Go To Line dialog OK button press.
+ *
+ * @param dialog Go To Line dialog
+ * @param arg Argument (ui_demo_t *)
+ * @param text Submitted text
+ */
+static void go_to_line_dialog_bok(ui_prompt_dialog_t *dialog, void *arg,
+    const char *text)
+{
+	edit_t *edit = (edit_t *) arg;
+	gfx_context_t *gc = ui_window_get_gc(edit->window);
+	char *endptr;
+	int line;
+
+	ui_prompt_dialog_destroy(dialog);
+	line = strtol(text, &endptr, 10);
+	if (*endptr != '\0') {
+		status_display("Invalid number entered.");
+		return;
+	}
+
+	caret_move_absolute(line, pane.ideal_column, dir_before, false);
+	// TODO Smarter cursor management
+	(void) pane_update(&pane);
+	gfx_cursor_set_visible(gc, true);
+	(void) gfx_update(gc);
+}
+
+/** Go To Line dialog cancel button press.
+ *
+ * @param dialog File dialog
+ * @param arg Argument (ui_demo_t *)
+ */
+static void go_to_line_dialog_bcancel(ui_prompt_dialog_t *dialog, void *arg)
+{
+	edit_t *edit = (edit_t *) arg;
+	gfx_context_t *gc = ui_window_get_gc(edit->window);
+
+	ui_prompt_dialog_destroy(dialog);
+	// TODO Smarter cursor management
+	pane.rflags |= REDRAW_CARET;
+	(void) pane_update(&pane);
+	gfx_cursor_set_visible(gc, true);
+}
+
+/** Go To Line dialog close request.
+ *
+ * @param dialog File dialog
+ * @param arg Argument (ui_demo_t *)
+ */
+static void go_to_line_dialog_close(ui_prompt_dialog_t *dialog, void *arg)
+{
+	edit_t *edit = (edit_t *) arg;
+	gfx_context_t *gc = ui_window_get_gc(edit->window);
+
+	ui_prompt_dialog_destroy(dialog);
+	// TODO Smarter cursor management
+	pane.rflags |= REDRAW_CARET;
+	(void) pane_update(&pane);
+	gfx_cursor_set_visible(gc, true);
 }
 
