about summary refs log tree commit diff stats
path: root/src/LYMainLoop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/LYMainLoop.c')
-rw-r--r--src/LYMainLoop.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 71a086e8..cfddb3f6 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -1719,6 +1719,8 @@ new_cmd:  /*
 	   *  back through the getch() loop.
 	   */
 
+	CTRACE_FLUSH(tfp);
+
 	switch(cmd) {
 	case 0: /* unmapped character */
 	default:
@@ -4133,7 +4135,7 @@ if (!LYUseFormsOptions) {
 
 	case LYK_EDIT:	/* edit */
 	    if (no_editor) {
-		if (old_c != real_c)	{
+		if (old_c != real_c) {
 		    old_c = real_c;
 		    HTUserMsg(EDIT_DISABLED);
 		}
@@ -4293,6 +4295,38 @@ if (!LYUseFormsOptions) {
 	    }
 	    break;
 
+	case LYK_EDIT_TEXTAREA: /* use external editor on a TEXTAREA - KED */
+	    if (no_editor) {
+		if (old_c != real_c) {
+		    old_c = real_c;
+		    HTUserMsg(EDIT_DISABLED);
+		}
+		break;
+	    }
+
+		/* is curent link part of a textarea */
+	    if (links[curdoc.link].type == WWW_FORM_LINK_TYPE &&
+		links[curdoc.link].form->type == F_TEXTAREA_TYPE) {
+
+		/* stop screen */
+		stop_curses();
+
+		HText_ExtEditForm (&links[curdoc.link]);
+
+		/* start screen */
+		start_curses();
+		refresh_screen = TRUE;
+
+		/*
+		cmd = LYK_REFRESH;
+		goto new_cmd;
+		*/
+
+	    } else {
+		HTInfoMsg (NOT_IN_TEXTAREA);
+	    }
+	    break;
+
 	case LYK_PRINT:  /* print the file */
 	    if (LYValidate) {
 		if (old_c != real_c)	{