Copy full filename to command line (Ctrl-F) patch

Walery Studennikov despair at sama.ru
Wed Aug 1 04:00:05 UTC 2001


Here is slightly purified and adapted to CVS version of MC patch
from Max Schedriviy.

It allows to copy full filename (with path) by pressing Ctrl-F.
It is certainly more quick and convenient than using Alt-A + Ctrl-Enter.


Regards, Walery
-------------- next part --------------
--- main.c.orig	Wed Aug  1 08:43:56 2001
+++ main.c	Wed Aug  1 08:53:16 2001
@@ -1574,6 +1574,7 @@
 }
 #endif
 
+
 #ifndef HAVE_GNOME
 static void copy_current_pathname (void)
 {
@@ -1645,6 +1646,13 @@
     g_free (tmp);
 }   
 
+/* copy filename with full path to command line - mAX */
+void copy_full_prog_name (void)
+{
+    copy_current_pathname ();
+    copy_prog_name ();
+}
+
 static void copy_tagged (WPanel *panel)
 {
     int i;
@@ -1817,6 +1825,7 @@
     { ESC_CHAR,   nothing },
     { XCTRL('c'), nothing },
     { XCTRL('g'), nothing },
+    { XCTRL('f'), copy_full_prog_name },
     { 0, 0 },
 };
 
@@ -2007,7 +2016,11 @@
 	    send_message_to (h, (Widget *) cmdline, WIDGET_KEY, id);
 	    return MSG_HANDLED;
 	}
-
+	if (id == XCTRL('f')){
+	    copy_full_prog_name ();
+	    return MSG_HANDLED;
+	}
+     
 	if ((!alternate_plus_minus || !(console_flag || xterm_flag)) &&
              !quote && !cpanel->searching) {
 	    if(!only_leading_plus_minus) {


More information about the mc-devel mailing list